diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2019-02-10 19:38:17 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2019-02-10 19:38:17 +0900 |
| commit | 962b3ca78e8429b5209dc5825d083306f1a3e42d (patch) | |
| tree | 35e1c1cb239ff7775ea142a716efa14b3a3dc5b7 /src | |
| parent | Optimize url-preview image (#4216) (diff) | |
| download | sharkey-962b3ca78e8429b5209dc5825d083306f1a3e42d.tar.gz sharkey-962b3ca78e8429b5209dc5825d083306f1a3e42d.tar.bz2 sharkey-962b3ca78e8429b5209dc5825d083306f1a3e42d.zip | |
[Client] Fix bug
Diffstat (limited to 'src')
| -rw-r--r-- | src/client/app/admin/views/users.vue | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/src/client/app/admin/views/users.vue b/src/client/app/admin/views/users.vue index 8aab0b54f0..d46c72cbe0 100644 --- a/src/client/app/admin/views/users.vue +++ b/src/client/app/admin/views/users.vue @@ -129,17 +129,26 @@ export default Vue.extend({ const usernamePromise = this.$root.api('users/show', parseAcct(this.target)); const idPromise = this.$root.api('users/show', { userId: this.target }); - usernamePromise.then(res); - idPromise.then(res); - - idPromise.catch(e => { - if (e == 'user not found') { + let _notFound = false; + const notFound = () => { + if (_notFound) { this.$root.dialog({ type: 'error', text: this.$t('user-not-found') }); + } else { + _notFound = true; + } + }; + + usernamePromise.then(res).catch(e => { + if (e == 'user not found') { + notFound(); } }); + idPromise.then(res).catch(e => { + notFound(); + }); }); }, |