Commit c7e6eff4 authored by Filipa Lacerda's avatar Filipa Lacerda

Use function to define data instead of an object

parent cad686cc
...@@ -11,8 +11,10 @@ document.addEventListener('DOMContentLoaded', () => { ...@@ -11,8 +11,10 @@ document.addEventListener('DOMContentLoaded', () => {
const pipelineGraphApp = new Vue({ const pipelineGraphApp = new Vue({
el: '#js-pipeline-graph-vue', el: '#js-pipeline-graph-vue',
data: { data() {
return {
mediator, mediator,
};
}, },
components: { components: {
pipelineGraph, pipelineGraph,
......
...@@ -6,8 +6,8 @@ import PipelineStore from './stores/pipeline_store'; ...@@ -6,8 +6,8 @@ import PipelineStore from './stores/pipeline_store';
import PipelineService from './services/pipeline_service'; import PipelineService from './services/pipeline_service';
export default class pipelinesMediator { export default class pipelinesMediator {
constructor(options) { constructor(options = {}) {
this.options = options || {}; this.options = options;
this.store = new PipelineStore(); this.store = new PipelineStore();
this.service = new PipelineService(options.endpoint); this.service = new PipelineService(options.endpoint);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment