You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 28, 2024. It is now read-only.
addUnsavedChanges() was intended to avoid saving the same id multiple times (the comment says "Don't add duplicate state"), but it still does. This means that multiple calls to addUnsavedChanges() with a given id followed by one call to removeUnsavedChanges() with that same id will leave other copies of the id in the array, and the beforeunload listener will still be active.
The issue is that the condition here is always true.
Instead of !indexOf(id) > -1 it should be !(indexOf(id) > -1), I believe.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
addUnsavedChanges()
was intended to avoid saving the same id multiple times (the comment says "Don't add duplicate state"), but it still does. This means that multiple calls toaddUnsavedChanges()
with a given id followed by one call toremoveUnsavedChanges()
with that same id will leave other copies of the id in the array, and thebeforeunload
listener will still be active.The issue is that the condition here is always true.
Instead of
!indexOf(id) > -1
it should be!(indexOf(id) > -1)
, I believe.The text was updated successfully, but these errors were encountered: