diff --git a/packages/core/src/router/index.ts b/packages/core/src/router/index.ts index 5b2a7691..65b29ee1 100644 --- a/packages/core/src/router/index.ts +++ b/packages/core/src/router/index.ts @@ -358,6 +358,7 @@ export function makeRouter( window.addEventListener("beforeunload", blockOutside); } else if (!hasConfirm && store._hasConfirm) { window.removeEventListener("beforeunload", blockOutside); + this.commit(); } store._hasConfirm = hasConfirm;