You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on a project that has a requirement to use RouterRootURL, but the issue is that ember-error-route only cares about the rootURL set in the environment, rather than the one that is set in the Router.
Consideration - would this impact fastboot?
import ErrorRoute from 'ember-error-route';
import { service } from '@ember/service';
export default class CustomErrorRoute extends ErrorRoute {
@service router;
setupController(controller, error) {
super.setupController(...arguments);
console.error(error);
}
serialize({ transition }) {
let path = this.urlForRouteInfo(transition.to);
const rootURL = this.router.rootURL;
if (path.startsWith(rootURL)) {
path = path.slice(rootURL.length);
}
return { path };
}
}
The text was updated successfully, but these errors were encountered:
I'm working on a project that has a requirement to use RouterRootURL, but the issue is that ember-error-route only cares about the
rootURL
set in the environment, rather than the one that is set in the Router.Consideration - would this impact fastboot?
The text was updated successfully, but these errors were encountered: