Commit 5838b160 authored by Regis's avatar Regis

rafactor logic for event handling

parent 75bddd01
...@@ -13,11 +13,7 @@ ...@@ -13,11 +13,7 @@
props: ['stage', 'svgs', 'match'], props: ['stage', 'svgs', 'match'],
methods: { methods: {
fetchBuilds() { fetchBuilds() {
if (this.request) { if (this.request) return this.clearBuilds();
this.request = false;
this.builds = '';
return null;
}
return this.$http.get(this.stage.dropdown_path) return this.$http.get(this.stage.dropdown_path)
.then((response) => { .then((response) => {
...@@ -27,9 +23,9 @@ ...@@ -27,9 +23,9 @@
'Something went wrong on our end.', 'Something went wrong on our end.',
)); ));
}, },
clearState() { clearBuilds() {
this.request = false;
this.builds = ''; this.builds = '';
this.request = false;
}, },
}, },
computed: { computed: {
......
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