Skip to content

Commit 5dc28c6

Browse files
committed
Updated code to make sure beoreEachRoute has priority
1 parent 6d23940 commit 5dc28c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Router/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ const handleHashChange = async override => {
252252
let result = await beforeEachRoute(getActiveHash(), request)
253253

254254
// test if a local hook is configured for the route
255-
if (route.beforeNavigate) {
255+
if (result && route.beforeNavigate) {
256256
result = await route.beforeNavigate(getActiveHash(), request)
257257
}
258258

0 commit comments

Comments
 (0)