summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2017-05-26 15:05:43 +0100
committerFilipa Lacerda <filipa@gitlab.com>2017-05-26 15:08:18 +0100
commitc7e6eff4dd3a98a4f591801159a0ef1c1f896a62 (patch)
treeabd3748a8596ce9bb7bbb792a8ee624f12aeb489
parentcad686cc30309532ebf9a81ad37a60a98c84577c (diff)
downloadgitlab-ce-31849-pipeline-show-view-realtime.tar.gz
Use function to define data instead of an object31849-pipeline-show-view-realtime
-rw-r--r--app/assets/javascripts/pipelines/pipeline_details_bundle.js6
-rw-r--r--app/assets/javascripts/pipelines/pipeline_details_mediatior.js4
2 files changed, 6 insertions, 4 deletions
diff --git a/app/assets/javascripts/pipelines/pipeline_details_bundle.js b/app/assets/javascripts/pipelines/pipeline_details_bundle.js
index 03b399cc726..5aab25e0348 100644
--- a/app/assets/javascripts/pipelines/pipeline_details_bundle.js
+++ b/app/assets/javascripts/pipelines/pipeline_details_bundle.js
@@ -11,8 +11,10 @@ document.addEventListener('DOMContentLoaded', () => {
const pipelineGraphApp = new Vue({
el: '#js-pipeline-graph-vue',
- data: {
- mediator,
+ data() {
+ return {
+ mediator,
+ };
},
components: {
pipelineGraph,
diff --git a/app/assets/javascripts/pipelines/pipeline_details_mediatior.js b/app/assets/javascripts/pipelines/pipeline_details_mediatior.js
index 5e0c60eb796..b9a6d5ca5fc 100644
--- a/app/assets/javascripts/pipelines/pipeline_details_mediatior.js
+++ b/app/assets/javascripts/pipelines/pipeline_details_mediatior.js
@@ -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);