@a11d/lit-application
Advanced tools
Comparing version 0.0.19 to 0.0.20
@@ -7,5 +7,5 @@ import { Router as RouterControllerBase } from '@lit-labs/router'; | ||
constructor(...args: ConstructorParameters<typeof RouterControllerBase>); | ||
private readonly pagesByRoute; | ||
private currentPage?; | ||
private importDecoratorRoutesIfAvailable; | ||
} | ||
//# sourceMappingURL=RouterController.d.ts.map |
@@ -6,3 +6,2 @@ import { Router as RouterControllerBase } from '@lit-labs/router'; | ||
super(...args); | ||
this.pagesByRoute = new Map(); | ||
this.host = args[0]; | ||
@@ -22,9 +21,5 @@ } | ||
render: p => { | ||
const cached = this.pagesByRoute.get(Router.path); | ||
if (cached) { | ||
return cached; | ||
} | ||
const page = new pageConstructor(p); | ||
this.pagesByRoute.set(Router.path, page); | ||
return page; | ||
return this.currentPage?.parameters === p && this.currentPage?.constructor === pageConstructor | ||
? this.currentPage | ||
: this.currentPage = new pageConstructor(p); | ||
} | ||
@@ -31,0 +26,0 @@ }); |
{ | ||
"name": "@a11d/lit-application", | ||
"version": "0.0.19", | ||
"version": "0.0.20", | ||
"description": "Lit-based application shell.", | ||
@@ -5,0 +5,0 @@ "repository": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
130136
1334