From ae6437442b5547d3ca93f7c2dbbc33b32d93ea1e Mon Sep 17 00:00:00 2001 From: James Grugett Date: Sun, 18 Sep 2022 16:36:45 -0500 Subject: [PATCH] Fix unsaved changes warning erronously appearing --- web/hooks/use-warn-unsaved-changes.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/hooks/use-warn-unsaved-changes.ts b/web/hooks/use-warn-unsaved-changes.ts index 53620aae..04f6a59a 100644 --- a/web/hooks/use-warn-unsaved-changes.ts +++ b/web/hooks/use-warn-unsaved-changes.ts @@ -25,7 +25,7 @@ export const useWarnUnsavedChanges = (hasUnsavedChanges: boolean) => { } window.addEventListener('beforeunload', warnUnsavedChanges) - Router.events.on('routeChangeStart', (href) => beforeRouteHandler(href)) + Router.events.on('routeChangeStart', beforeRouteHandler) return () => { window.removeEventListener('beforeunload', warnUnsavedChanges)