From 6c8ef696549c3c08d39166e5620c74e6cfea173a Mon Sep 17 00:00:00 2001
From: Eric Bailey <git@esb.lol>
Date: Wed, 18 Sep 2024 15:45:20 -0500
Subject: Fix for undefined ref on hot reload on web (#5407)

---
 src/state/shell/composer/useComposerKeyboardShortcut.tsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src/state/shell/composer/useComposerKeyboardShortcut.tsx')

diff --git a/src/state/shell/composer/useComposerKeyboardShortcut.tsx b/src/state/shell/composer/useComposerKeyboardShortcut.tsx
index 0cdc6c754..01306e36e 100644
--- a/src/state/shell/composer/useComposerKeyboardShortcut.tsx
+++ b/src/state/shell/composer/useComposerKeyboardShortcut.tsx
@@ -48,7 +48,7 @@ export function useComposerKeyboardShortcut() {
     function handler(event: KeyboardEvent) {
       if (shouldIgnore(event)) return
       if (
-        openDialogs.current.size > 0 ||
+        openDialogs?.current.size > 0 ||
         isModalActive ||
         activeLightbox ||
         isDrawerOpen
-- 
cgit 1.4.1

