Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable {
// in experience editor, we need to reload to avoid confusing the editor ribbon
if (isExperienceEditorActive() && window) {
const currentLocation = window.location.pathname + window.location.search + window.location.hash;
if (currentLocation !== state.url) {
window.location.assign(state.url);
return null;
}
}
// route params are created by custom route matcher in app-routing.module
return this.jssService.changeRoute(route.params.serverRoute, route.params.language);
}
}