File tree Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -267,6 +267,7 @@ class Router {
267
267
*/
268
268
269
269
_addRoute ( path , handler , segments ) {
270
+ handler . path = path
270
271
guardComponent ( path , handler )
271
272
segments . push ( {
272
273
path : path ,
Original file line number Diff line number Diff line change @@ -35,6 +35,8 @@ export default class Route {
35
35
this . path = path
36
36
this . router = router
37
37
// for internal use
38
- this . _matched = matched || router . _notFoundHandler
38
+ this . matched = matched || router . _notFoundHandler
39
+ // Important: freeze self to prevent observation
40
+ Object . freeze ( this )
39
41
}
40
42
}
Original file line number Diff line number Diff line change @@ -32,8 +32,8 @@ export default class RouteTransition {
32
32
this . deactivateQueue = router . _views
33
33
34
34
// check the default handler of the deepest match
35
- let matched = to . _matched
36
- ? Array . prototype . slice . call ( to . _matched )
35
+ let matched = to . matched
36
+ ? Array . prototype . slice . call ( to . matched )
37
37
: [ ]
38
38
39
39
// the activate queue is an array of route handlers
You can’t perform that action at this time.
0 commit comments