Skip to content

Commit

Permalink
fix: 添加 usingContext 缺省
Browse files Browse the repository at this point in the history
  • Loading branch information
Chanzhaoyu committed Mar 17, 2023
1 parent 95ce026 commit 560378f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/store/modules/chat/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export function defaultState(): Chat.ChatState {

export function getLocalState(): Chat.ChatState {
const localState = ss.get(LOCAL_NAME)
return localState ?? defaultState()
return { ...defaultState(), ...localState }
}

export function setLocalState(state: Chat.ChatState) {
Expand Down

0 comments on commit 560378f

Please sign in to comment.