Skip to content

Commit

Permalink
router.confirmation : fix commit manquant au toggle off
Browse files Browse the repository at this point in the history
  • Loading branch information
JabX committed Jan 27, 2025
1 parent b2424ae commit 6563a6b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/core/src/router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,7 @@ export function makeRouter<C, Q extends QueryParamConfig>(
window.addEventListener("beforeunload", blockOutside);
} else if (!hasConfirm && store._hasConfirm) {
window.removeEventListener("beforeunload", blockOutside);
this.commit();
}

store._hasConfirm = hasConfirm;
Expand Down

0 comments on commit 6563a6b

Please sign in to comment.