fixes incorrect default transition to datasets entity on browse.entity route entry
@@ -20,8 +20,10 @@ export default route({
/**
* Browse route does not render any content, but hydrates the store with initial data transition to child route
*/
- afterModel() {
- this.transitionTo('browse.entity', 'datasets');
+ afterModel(model, transition) {
+ // Extract the entity being viewed from the transition state
+ const { params: { 'browse.entity': { entity = 'datasets' } } } = transition;
+ this.transitionTo('browse.entity', entity);
}
})
);
