Skip to content

Commit 3e801c9

Browse files
committed
remove codition
1 parent a32c59b commit 3e801c9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/modules/user/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export const UserModule: StorefrontModule = async function ({store}) {
3333
const type = mutation.type
3434

3535
if (
36-
type.endsWith(types.USER_INFO_LOADED) && state.user.current
36+
type.endsWith(types.USER_INFO_LOADED)
3737
) {
3838
StorageManager.get('user').setItem('current-user', state.user.current).catch((reason) => {
3939
console.error(reason) // it doesn't work on SSR
@@ -49,7 +49,7 @@ export const UserModule: StorefrontModule = async function ({store}) {
4949
}
5050

5151
if (
52-
type.endsWith(types.USER_TOKEN_CHANGED) && state.user.token
52+
type.endsWith(types.USER_TOKEN_CHANGED)
5353
) {
5454
StorageManager.get('user').setItem('current-token', state.user.token).catch((reason) => {
5555
console.error(reason) // it doesn't work on SSR

0 commit comments

Comments
 (0)