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 {
267267 */
268268
269269 _addRoute ( path , handler , segments ) {
270+ handler . path = path
270271 guardComponent ( path , handler )
271272 segments . push ( {
272273 path : path ,
Original file line number Diff line number Diff line change @@ -35,6 +35,8 @@ export default class Route {
3535 this . path = path
3636 this . router = router
3737 // 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 )
3941 }
4042}
Original file line number Diff line number Diff line change @@ -32,8 +32,8 @@ export default class RouteTransition {
3232 this . deactivateQueue = router . _views
3333
3434 // 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 )
3737 : [ ]
3838
3939 // the activate queue is an array of route handlers
You can’t perform that action at this time.
0 commit comments