From 34692f57c0fee2a91b26a2627e3d2878ad8c8bac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9?= Date: Fri, 6 Oct 2023 11:37:34 -0300 Subject: [PATCH 1/2] Fix: shortcut hook --- bigbluebutton-html5/imports/ui/core/hooks/useShortcut.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bigbluebutton-html5/imports/ui/core/hooks/useShortcut.tsx b/bigbluebutton-html5/imports/ui/core/hooks/useShortcut.tsx index 7f05679dcd..c82e214252 100644 --- a/bigbluebutton-html5/imports/ui/core/hooks/useShortcut.tsx +++ b/bigbluebutton-html5/imports/ui/core/hooks/useShortcut.tsx @@ -15,13 +15,13 @@ export function useShortcut(param: string): string { const [shortcut, setShortcut] = useState(''); useEffect(() => { - const ENABLED_SHORTCUTS = getFromUserSettings('bbb_shortcuts', null); + const ENABLED_SHORTCUTS = getFromUserSettings('bbb_shortcuts'); const filteredShortcuts: ShortcutObject[] = Object.values(BASE_SHORTCUTS).filter( (el: ShortcutObject) => (ENABLED_SHORTCUTS ? ENABLED_SHORTCUTS.includes(el.descId) : true), ); const shortcutsString: string = filteredShortcuts - .filter((el) => el.descId === param.toLowerCase()) + .filter((el) => el.descId.toLowerCase() === param.toLowerCase()) .map((el) => el.accesskey) .pop() || ''; From ab0ff67685f8e06d29d8b3a5364983073ae0d400 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Castro?= <36093456+Scroody@users.noreply.github.com> Date: Fri, 6 Oct 2023 11:41:26 -0300 Subject: [PATCH 2/2] Update useShortcut.tsx --- bigbluebutton-html5/imports/ui/core/hooks/useShortcut.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bigbluebutton-html5/imports/ui/core/hooks/useShortcut.tsx b/bigbluebutton-html5/imports/ui/core/hooks/useShortcut.tsx index c82e214252..832b0c4a33 100644 --- a/bigbluebutton-html5/imports/ui/core/hooks/useShortcut.tsx +++ b/bigbluebutton-html5/imports/ui/core/hooks/useShortcut.tsx @@ -15,7 +15,7 @@ export function useShortcut(param: string): string { const [shortcut, setShortcut] = useState(''); useEffect(() => { - const ENABLED_SHORTCUTS = getFromUserSettings('bbb_shortcuts'); + const ENABLED_SHORTCUTS = getFromUserSettings('bbb_shortcuts', null); const filteredShortcuts: ShortcutObject[] = Object.values(BASE_SHORTCUTS).filter( (el: ShortcutObject) => (ENABLED_SHORTCUTS ? ENABLED_SHORTCUTS.includes(el.descId) : true), );