mirror of
https://github.com/Chanzhaoyu/chatgpt-web.git
synced 2025-07-21 03:44:21 +00:00
fix: 添加 usingContext 缺省
This commit is contained in:
@@ -14,7 +14,7 @@ export function defaultState(): Chat.ChatState {
|
|||||||
|
|
||||||
export function getLocalState(): Chat.ChatState {
|
export function getLocalState(): Chat.ChatState {
|
||||||
const localState = ss.get(LOCAL_NAME)
|
const localState = ss.get(LOCAL_NAME)
|
||||||
return localState ?? defaultState()
|
return { ...defaultState(), ...localState }
|
||||||
}
|
}
|
||||||
|
|
||||||
export function setLocalState(state: Chat.ChatState) {
|
export function setLocalState(state: Chat.ChatState) {
|
||||||
|
Reference in New Issue
Block a user