Browse Source

fix falsy currentUser

afc163 8 năm trước cách đây
mục cha
commit
422c720713
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/models/user.js

+ 1 - 1
src/models/user.js

@@ -35,7 +35,7 @@ export default {
     saveCurrentUser(state, action) {
       return {
         ...state,
-        currentUser: action.payload,
+        currentUser: action.payload || {},
       };
     },
     changeNotifyCount(state, action) {