Skip to content

Commit eac6b63

Browse files
committed
chore: add missing leaving routes guards
1 parent aa89041 commit eac6b63

File tree

1 file changed

+7
-0
lines changed
  • packages/router/src/navigation-api

1 file changed

+7
-0
lines changed

packages/router/src/navigation-api/index.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,13 @@ export function createNavigationApiRouter(options: RouterApiOptions): Router {
145145
from
146146
)
147147

148+
// leavingRecords is already reversed
149+
for (const record of leavingRecords) {
150+
record.leaveGuards.forEach(guard => {
151+
guards.push(guardToPromiseFn(guard, to, from))
152+
})
153+
}
154+
148155
const canceledNavigationCheck = async () => {
149156
checkCanceledNavigationAndReject(to, from)
150157
}

0 commit comments

Comments
 (0)