Skip to content

Commit 6457ffe

Browse files
committed
fix: Simplify popstate delta check logic in Router
1 parent 30f0866 commit 6457ffe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/routers/Router.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export function Router(props: RouterProps): JSX.Element {
3232
},
3333
init: notify => bindEvent(window, "popstate",
3434
notifyIfNotBlocked(notify, delta => {
35-
if (delta && delta < 0) {
35+
if (delta) {
3636
return !beforeLeave.confirm(delta);
3737
} else {
3838
const s = getSource();

0 commit comments

Comments
 (0)