Compare commits
1 Commits
master
...
perf/getIn
Author | SHA1 | Date |
---|---|---|
花裤衩 | 8d81c98539 |
|
@ -51,14 +51,14 @@ const actions = {
|
||||||
const { data } = response
|
const { data } = response
|
||||||
|
|
||||||
if (!data) {
|
if (!data) {
|
||||||
reject('Verification failed, please Login again.')
|
return reject('Verification failed, please Login again.')
|
||||||
}
|
}
|
||||||
|
|
||||||
const { roles, name, avatar, introduction } = data
|
const { roles, name, avatar, introduction } = data
|
||||||
|
|
||||||
// roles must be a non-empty array
|
// roles must be a non-empty array
|
||||||
if (!roles || roles.length <= 0) {
|
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)
|
commit('SET_ROLES', roles)
|
||||||
|
|
Loading…
Reference in New Issue