Browse Source

bug: fix update userinfo

张延森 5 years ago
parent
commit
f8b325cc55
1 changed files with 2 additions and 4 deletions
  1. 2
    4
      src/reducers/user.js

+ 2
- 4
src/reducers/user.js View File

@@ -62,15 +62,13 @@ export default function user(state = INITIAL_STATE, action) {
62 62
     case UPDATE_USER_INFO: {
63 63
       // debugger
64 64
       const { person, extraInfo, miniApp = {} } = state.userInfo
65
+      const newPerson = mergeNotNull(person, action.payload)
65 66
       
66 67
       return {
67 68
         ...state,
68 69
         userInfo: {
69 70
           extraInfo,
70
-          person: {
71
-            ...person,
72
-            ...action.payload
73
-          },
71
+          person: newPerson,
74 72
           miniApp,
75 73
         }
76 74
       }