Showing
1 changed file
with
2 additions
and
2 deletions
@@ -59,8 +59,8 @@ const USER_PERMISSION = { | @@ -59,8 +59,8 @@ const USER_PERMISSION = { | ||
59 | const IS_CUSTOMER_USER = (() => { | 59 | const IS_CUSTOMER_USER = (() => { |
60 | const ls = createStorage({ storage: localStorage }) | 60 | const ls = createStorage({ storage: localStorage }) |
61 | const common = ls.get(GLOBAL_STORAGE_KEY) || { USER__INFO__: {} } | 61 | const common = ls.get(GLOBAL_STORAGE_KEY) || { USER__INFO__: {} } |
62 | - const userInfo = common.USER__INFO__.value || {} | ||
63 | - return (userInfo.roles || [])[0] === 'CUSTOMER_USER' | 62 | + const userInfo = ((common || {}).USER__INFO__ || {}).value || {} |
63 | + return (((userInfo || {})).roles || [])[0] === 'CUSTOMER_USER' | ||
64 | })() | 64 | })() |
65 | 65 | ||
66 | const hasSavePermission = () => { | 66 | const hasSavePermission = () => { |