mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-23 18:01:08 +01:00
Fix strict mode editor blur bug
This commit is contained in:
@@ -5,8 +5,9 @@ const useGlobalState = createGlobalState<Record<string, string>>({});
|
||||
|
||||
export function useRequestUpdateKey(requestId: string | null) {
|
||||
const [keys, setKeys] = useGlobalState();
|
||||
const key = keys[requestId ?? 'n/a'];
|
||||
return {
|
||||
updateKey: `${requestId}::${keys[requestId ?? 'n/a']}`,
|
||||
updateKey: `${requestId}::${key ?? 'default'}`,
|
||||
wasUpdatedExternally: (changedRequestId: string) => {
|
||||
setKeys((m) => ({ ...m, [changedRequestId]: generateId() }));
|
||||
},
|
||||
|
||||
@@ -62,7 +62,10 @@ export function useTauriListeners() {
|
||||
: null;
|
||||
|
||||
if (queryKey === null) {
|
||||
throw new Error('Unrecognized updated model ' + payload.model);
|
||||
if (payload.model) {
|
||||
console.log('Unrecognized updated model:', payload);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
const skipSync = payload.model === 'key_value' && payload.namespace === NAMESPACE_NO_SYNC;
|
||||
|
||||
Reference in New Issue
Block a user