Skip to content

Commit 560378f

Browse files
committed
fix: 添加 usingContext 缺省
1 parent 95ce026 commit 560378f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/store/modules/chat/helper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export function defaultState(): Chat.ChatState {
1414

1515
export function getLocalState(): Chat.ChatState {
1616
const localState = ss.get(LOCAL_NAME)
17-
return localState ?? defaultState()
17+
return { ...defaultState(), ...localState }
1818
}
1919

2020
export function setLocalState(state: Chat.ChatState) {

0 commit comments

Comments
 (0)