1
0
mirror of https://github.com/PanJiaChen/vue-element-admin.git synced 2025-04-05 11:18:42 +08:00

Merge 8d81c985395be8c92c7926af3bd7fe735017666a into 6858a9ad67483025f6a9432a926beb9327037be3

This commit is contained in:
花裤衩 2024-11-28 00:28:54 +00:00 committed by GitHub
commit 55374aa6d9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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)