diff --git a/src/hooks/preventNavigation.tsx b/src/hooks/preventNavigation.tsx index f177482..654b9cb 100644 --- a/src/hooks/preventNavigation.tsx +++ b/src/hooks/preventNavigation.tsx @@ -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]) }