fix: 添加 usingContext 缺省

This commit is contained in:
ChenZhaoYu
2023-03-17 11:40:05 +08:00
parent 95ce026813
commit 560378fd45

View File

@@ -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) {