浏览代码

fix falsy currentUser

afc163 7 年之前
父节点
当前提交
422c720713
共有 1 个文件被更改,包括 1 次插入1 次删除
  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) {