diff --git a/frontend/src/hooks/hotkeys/useKeyboardHotkeys.tsx b/frontend/src/hooks/hotkeys/useKeyboardHotkeys.tsx index 68e1bc7ae4..12b70fa68e 100644 --- a/frontend/src/hooks/hotkeys/useKeyboardHotkeys.tsx +++ b/frontend/src/hooks/hotkeys/useKeyboardHotkeys.tsx @@ -90,8 +90,14 @@ function KeyboardHotkeysProvider({ (keyCombination: string, callback: () => void): void => { if (!shortcuts.current[keyCombination]) { shortcuts.current[keyCombination] = callback; + } else if (process.env.NODE_ENV === 'development') { + throw new Error( + `This shortcut is already present in current scope :- ${keyCombination}`, + ); } else { - throw new Error('This shortcut is already present in current scope'); + console.error( + `This shortcut is already present in current scope :- ${keyCombination}`, + ); } }, [shortcuts],