Use function to define data instead of an object

This commit is contained in:
Filipa Lacerda 2017-05-26 15:05:43 +01:00
parent cad686cc30
commit c7e6eff4dd
2 changed files with 6 additions and 4 deletions

View file

@ -11,8 +11,10 @@ document.addEventListener('DOMContentLoaded', () => {
const pipelineGraphApp = new Vue({
el: '#js-pipeline-graph-vue',
data: {
mediator,
data() {
return {
mediator,
};
},
components: {
pipelineGraph,

View file

@ -6,8 +6,8 @@ import PipelineStore from './stores/pipeline_store';
import PipelineService from './services/pipeline_service';
export default class pipelinesMediator {
constructor(options) {
this.options = options || {};
constructor(options = {}) {
this.options = options;
this.store = new PipelineStore();
this.service = new PipelineService(options.endpoint);