From 1571c99642580c73961859e9c4db08ba72ce3800 Mon Sep 17 00:00:00 2001 From: aniketfuryrocks Date: Tue, 3 Nov 2020 22:21:38 +0530 Subject: [PATCH] dontPrevent hook dep --- src/hooks/preventNavigation.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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]) }