From e78a88febfe4349c6af7fc7cff4df72e8313ed99 Mon Sep 17 00:00:00 2001 From: Aveline <352441+ym@users.noreply.github.com> Date: Fri, 23 May 2025 00:57:47 +0200 Subject: [PATCH] Update ui/src/hooks/stores.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- ui/src/hooks/stores.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ui/src/hooks/stores.ts b/ui/src/hooks/stores.ts index 2358d58..52ef89d 100644 --- a/ui/src/hooks/stores.ts +++ b/ui/src/hooks/stores.ts @@ -483,17 +483,17 @@ export const useHidStore = create((set, get) => ({ setKeyboardLedState: ledState => set({ keyboardLedState: ledState }), setIsNumLockActive: active => { - const keyboardLedState = get().keyboardLedState || defaultKeyboardLedState; + const keyboardLedState = { ...(get().keyboardLedState || defaultKeyboardLedState) }; keyboardLedState.num_lock = active; set({ keyboardLedState }); }, setIsCapsLockActive: active => { - const keyboardLedState = get().keyboardLedState || defaultKeyboardLedState; + const keyboardLedState = { ...(get().keyboardLedState || defaultKeyboardLedState) }; keyboardLedState.caps_lock = active; set({ keyboardLedState }); }, setIsScrollLockActive: active => { - const keyboardLedState = get().keyboardLedState || defaultKeyboardLedState; + const keyboardLedState = { ...(get().keyboardLedState || defaultKeyboardLedState) }; keyboardLedState.scroll_lock = active; set({ keyboardLedState }); },