Skip to content

Commit

Permalink
dontPrevent hook dep
Browse files Browse the repository at this point in the history
  • Loading branch information
aniketfuryrocks committed Nov 3, 2020
1 parent 8bdcf17 commit 1571c99
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hooks/preventNavigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ export default function (msg: string = "You might have some unsaved work. Do you
return window.onbeforeunload = undefined;
window.onbeforeunload = () => confirm(msg)
return () => window.onbeforeunload = void 0;
}, [msg])
}, [msg, dontPrevent])
}

0 comments on commit 1571c99

Please sign in to comment.