We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e4e285e commit f8d04b4Copy full SHA for f8d04b4
src/utils/auth/store/getters.js
@@ -5,7 +5,13 @@ const getters = {
5
const result = !!(roleCode === undefined || getters.userPermissions.filter(el => el === roleCode).length > 0)
6
return result
7
},
8
- userInfo: state => JSON.parse(state.user),
+ userInfo: state => {
9
+ return JSON.parse(state.user) || {
10
+ active: null,
11
+ email: null,
12
+ name: null
13
+ }
14
+ },
15
userUpdated: state => state.userUpdated,
16
userPasswordUpdated: state => state.userPasswordUpdated,
17
userPasswordUpdateError: state => state.userPasswordUpdateError,
0 commit comments