diff options
| author | taehoon <th.dev91@gmail.com> | 2019-04-17 22:47:56 -0400 |
|---|---|---|
| committer | taehoon <th.dev91@gmail.com> | 2019-04-17 22:47:56 -0400 |
| commit | 992c8e1f7714d228a5e8e450cbe856eb41f6096d (patch) | |
| tree | f10ebfcea62d35859e1c35271fa76165b2a167ec /src | |
| parent | ed0f10e9eeb669b4fde337500649903662ab91c9 (diff) | |
stop fetching user relationship when user is unauthorized
Diffstat (limited to 'src')
| -rw-r--r-- | src/modules/users.js | 6 |
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() |
