Fix unsaved changes warning erronously appearing
This commit is contained in:
parent
373cfc5d10
commit
ae6437442b
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user