diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 78009412..76f8989c 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -51,14 +51,14 @@ const actions = { const { data } = response if (!data) { - reject('Verification failed, please Login again.') + return reject('Verification failed, please Login again.') } const { roles, name, avatar, introduction } = data // roles must be a non-empty array if (!roles || roles.length <= 0) { - reject('getInfo: roles must be a non-null array!') + return reject('getInfo: roles must be a non-null array!') } commit('SET_ROLES', roles)