Skip to content

Commit c057f26

Browse files
committed
fix: crash on password window
1 parent 0dcb507 commit c057f26

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ts/state/selectors/modal.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ export function useConversationSettingsModalIsStandalone() {
117117
}
118118

119119
export function useModalStack() {
120-
return useSelector((state: StateType) => state.modals.modalStack);
120+
return useSelector((state: StateType) => state.modals?.modalStack ?? []); // that [] is needed for the password window
121121
}
122122

123123
export function useIsTopModal(modalId: ModalId) {

0 commit comments

Comments
 (0)