File tree 2 files changed +6
-4
lines changed 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -158,9 +158,11 @@ export default class VueRouter {
158
158
this . go ( 1 )
159
159
}
160
160
161
- getMatchedComponents ( to ? : RawLocation ) : Array < any > {
162
- const route = to
163
- ? this . resolve ( to ) . route
161
+ getMatchedComponents ( to ? : RawLocation | Route ) : Array < any > {
162
+ const route : any = to
163
+ ? to . matched
164
+ ? to
165
+ : this . resolve ( to ) . route
164
166
: this . currentRoute
165
167
if ( ! route ) {
166
168
return [ ]
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ declare class VueRouter {
28
28
go ( n : number ) : void ;
29
29
back ( ) : void ;
30
30
forward ( ) : void ;
31
- getMatchedComponents ( to ?: RawLocation ) : Component [ ] ;
31
+ getMatchedComponents ( to ?: RawLocation | Route ) : Component [ ] ;
32
32
onReady ( cb : Function , errorCb ?: Function ) : void ;
33
33
onError ( cb : Function ) : void ;
34
34
addRoutes ( routes : RouteConfig [ ] ) : void ;
You can’t perform that action at this time.
0 commit comments