Skip to content
This repository was archived by the owner on Jul 6, 2025. It is now read-only.

Commit ac7fa09

Browse files
committed
Rename hasDeferredRedirect to hasPreRedirect
1 parent d7e3ac3 commit ac7fa09

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

framework/core/redirect.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ import events from './events.ts'
33

44
const routerState = {
55
ready: false,
6-
hasDeferredRedirect: false,
6+
hasPreRedirect: false,
77
}
88

99
events.once('routerstate', state => {
10-
if (routerState.hasDeferredRedirect) {
10+
if (routerState.hasPreRedirect) {
1111
events.emit('popstate', { type: 'popstate', resetScroll: true })
1212
}
1313
Object.assign(routerState, state)
@@ -34,7 +34,7 @@ export async function redirect(url: string, replace?: boolean) {
3434

3535
if (routerState.ready) {
3636
events.emit('popstate', { type: 'popstate', resetScroll: true })
37-
} else if (!routerState.hasDeferredRedirect) {
38-
routerState.hasDeferredRedirect = true
37+
} else if (!routerState.hasPreRedirect) {
38+
routerState.hasPreRedirect = true
3939
}
4040
}

0 commit comments

Comments
 (0)