Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
willLiveReloadRouteTemplate(attrs) {
const meta = getPossibleRouteTemplateMeta(attrs.modulePath);
if (meta.looksLikeRouteTemplate) {
attrs.cancel = true;
this.clearRequirejs(meta.possibleTemplateName);
}
},
__isAlive() {
willHotReloadRouteTemplate(attrs) {
const meta = getPossibleRouteTemplateMeta(attrs);
if (!meta.looksLikeRouteTemplate) {
return;
}
const currentRouteName = this.hasActiveRoute() ? this.currentRouteName() : '';
if (meta.maybeClassicPath) {
this.forgetComponent(meta.possibleTemplateName, false);
const route = this.routeByPath(meta.possibleRouteName);
if (!route) {
return this.reloadWindow();
}
if (shouldRenderTemplate(currentRouteName, meta.possibleRouteName)) {
route.renderTemplate();
}
} else if (meta.isMU) {
let routeName = stripRouteTemplatePrefix(meta.possibleRouteName);
routeName = stripRouteTemplatePostfix(routeName);