-
-
Notifications
You must be signed in to change notification settings - Fork 10.7k
Closed
Labels
Description
Version
2.2.0
Test Case
<Route
path={path}
getComponent={function(location, callback) {
loader((routes) => {
this.scriptPath = routes.path.replace(/^.*\//, '');
callback(undefined, routes.rootComponent);
});
}}
getIndexRoute={function(location, callback) {
this.scriptPath = routes.path.replace(/^.*\//, '');
callback(undefined, routes.indexRoute);
}}
/>
Steps to reproduce
Attempt to access route object through this
in getComponent
or getComponents
.
Expected Behavior
The current route is available on the this
object as was implemented in previous versions and is also implemented for helpers like getIndexRoute
. Alternatively, this is explicitly exposed somewhere.
Actual Behavior
this
is undefined.