Skip to content

Commit 2222796

Browse files
committed
fix: ai modal close on esc
1 parent 1527497 commit 2222796

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/molecules/modal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export const Modal = ({
5858
: buttons.length >= 1
5959
? buttons.length - 1
6060
: undefined;
61-
if (!focusTabIndex || focusTabIndex < 0) return;
61+
if (focusTabIndex === undefined || focusTabIndex < 0) return;
6262
(buttons[focusTabIndex] as HTMLElement).focus();
6363

6464
const focusableElements = modalRef.current.querySelectorAll(

0 commit comments

Comments
 (0)