Skip to content

Commit de75721

Browse files
committed
fix method name (beforeResolve)
1 parent 26c0f16 commit de75721

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ export default class VueRouter {
122122
this.beforeHooks.push(fn)
123123
}
124124

125-
onResolve (fn: Function) {
125+
beforeResolve (fn: Function) {
126126
this.resolveHooks.push(fn)
127127
}
128128

types/router.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ declare class VueRouter {
2121
currentRoute: Route;
2222

2323
beforeEach (guard: NavigationGuard): void;
24-
onResolve (guard: NavigationGuard): void;
24+
beforeResolve (guard: NavigationGuard): void;
2525
afterEach (hook: (to: Route, from: Route) => any): void;
2626
push (location: RawLocation, onComplete?: Function, onAbort?: Function): void;
2727
replace (location: RawLocation, onComplete?: Function, onAbort?: Function): void;

0 commit comments

Comments
 (0)