summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/issue_show
diff options
context:
space:
mode:
authorFatih Acet <acetfatih@gmail.com>2019-01-26 00:56:53 +0100
committerFatih Acet <acetfatih@gmail.com>2019-01-30 23:18:19 +0100
commitf00c6db83f1f8b0bbb35230cfede0cfddfc9f7da (patch)
tree03c01119725f3fef09ab38e47c33190024265e96 /app/assets/javascripts/issue_show
parent4e40d72acff087b80b8919c2d96707807a43ce4b (diff)
downloadgitlab-ce-f00c6db83f1f8b0bbb35230cfede0cfddfc9f7da.tar.gz
Add new spec for updateStoreState method
Diffstat (limited to 'app/assets/javascripts/issue_show')
-rw-r--r--app/assets/javascripts/issue_show/components/app.vue10
1 files changed, 3 insertions, 7 deletions
diff --git a/app/assets/javascripts/issue_show/components/app.vue b/app/assets/javascripts/issue_show/components/app.vue
index 72398cb547a..c2c80218a87 100644
--- a/app/assets/javascripts/issue_show/components/app.vue
+++ b/app/assets/javascripts/issue_show/components/app.vue
@@ -212,9 +212,8 @@ export default {
}
return undefined;
},
-
updateStoreState() {
- this.service
+ return this.service
.getData()
.then(res => res.data)
.then(data => {
@@ -252,12 +251,9 @@ export default {
if (window.location.pathname !== data.web_url) {
visitUrl(data.web_url);
}
-
- return this.service.getData();
})
- .then(res => res.data)
- .then(data => {
- this.store.updateState(data);
+ .then(this.updateStoreState)
+ .then(() => {
eventHub.$emit('close.form');
})
.catch(error => {