Skip to content

Commit b9036d9

Browse files
committed
NavBlocker: Block all context-less click transitions by default
1 parent df859c1 commit b9036d9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

ui/src/components/forms/common/NavigationBlocker.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,12 @@ export function useDirtyFormBlockNavigation(
142142

143143
// If processing a "close button click" that is trying to close a
144144
// modal, the form with the same context should be able to block it.
145-
if (context && 'context' in args && args.context !== context) {
145+
if (
146+
context &&
147+
'context' in args &&
148+
args.context &&
149+
args.context !== context
150+
) {
146151
return false;
147152
}
148153

0 commit comments

Comments
 (0)