Use function to define data instead of an object
This commit is contained in:
parent
cad686cc30
commit
c7e6eff4dd
2 changed files with 6 additions and 4 deletions
|
@ -11,8 +11,10 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||
|
||||
const pipelineGraphApp = new Vue({
|
||||
el: '#js-pipeline-graph-vue',
|
||||
data: {
|
||||
mediator,
|
||||
data() {
|
||||
return {
|
||||
mediator,
|
||||
};
|
||||
},
|
||||
components: {
|
||||
pipelineGraph,
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue