summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/ide/components/ide_status_bar.vue
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/ide/components/ide_status_bar.vue')
-rw-r--r--app/assets/javascripts/ide/components/ide_status_bar.vue14
1 files changed, 6 insertions, 8 deletions
diff --git a/app/assets/javascripts/ide/components/ide_status_bar.vue b/app/assets/javascripts/ide/components/ide_status_bar.vue
index 368a2995ed9..e40f137d998 100644
--- a/app/assets/javascripts/ide/components/ide_status_bar.vue
+++ b/app/assets/javascripts/ide/components/ide_status_bar.vue
@@ -35,9 +35,7 @@ export default {
},
watch: {
lastCommit() {
- if (!this.isPollingInitialized) {
- this.initPipelinePolling();
- }
+ this.initPipelinePolling();
},
},
mounted() {
@@ -47,9 +45,8 @@ export default {
if (this.intervalId) {
clearInterval(this.intervalId);
}
- if (this.isPollingInitialized) {
- this.stopPipelinePolling();
- }
+
+ this.stopPipelinePolling();
},
methods: {
...mapActions('pipelines', ['fetchLatestPipeline', 'stopPipelinePolling']),
@@ -59,8 +56,9 @@ export default {
}, 1000);
},
initPipelinePolling() {
- this.fetchLatestPipeline();
- this.isPollingInitialized = true;
+ if (this.lastCommit) {
+ this.fetchLatestPipeline();
+ }
},
commitAgeUpdate() {
if (this.lastCommit) {