aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortaehoon <th.dev91@gmail.com>2019-04-17 22:47:56 -0400
committertaehoon <th.dev91@gmail.com>2019-04-17 22:47:56 -0400
commit992c8e1f7714d228a5e8e450cbe856eb41f6096d (patch)
treef10ebfcea62d35859e1c35271fa76165b2a167ec /src
parented0f10e9eeb669b4fde337500649903662ab91c9 (diff)
stop fetching user relationship when user is unauthorized
Diffstat (limited to 'src')
-rw-r--r--src/modules/users.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/modules/users.js b/src/modules/users.js
index a5dec794..c98e353a 100644
--- a/src/modules/users.js
+++ b/src/modules/users.js
@@ -224,8 +224,10 @@ const users = {
})
},
fetchUserRelationship (store, id) {
- return store.rootState.api.backendInteractor.fetchUserRelationship({ id })
- .then((relationships) => store.commit('updateUserRelationship', relationships))
+ if (store.state.currentUser) {
+ store.rootState.api.backendInteractor.fetchUserRelationship({ id })
+ .then((relationships) => store.commit('updateUserRelationship', relationships))
+ }
},
fetchBlocks (store) {
return store.rootState.api.backendInteractor.fetchBlocks()