@jack-henry/web-component-router
Advanced tools
Comparing version 2.0.0 to 2.0.1
@@ -392,3 +392,3 @@ /** | ||
let el = /** @type {!HTMLElement} */ (e.target); | ||
if (el.nodeName !== 'A') { | ||
if ((el.nodeName || '').toUpperCase() !== 'A') { | ||
const composedPath = e.composedPath(); | ||
@@ -398,3 +398,3 @@ for (let i = 0; i < composedPath.length; i++) { | ||
// el.nodeName for svg links are 'a' instead of 'A' | ||
if (el.nodeName.toUpperCase() === 'A') { | ||
if ((el.nodeName || '').toUpperCase() === 'A') { | ||
break; | ||
@@ -405,3 +405,3 @@ } | ||
if (!el || el.nodeName.toUpperCase() !== 'A') { | ||
if (!el || (el.nodeName || '').toUpperCase() !== 'A') { | ||
return; | ||
@@ -686,3 +686,3 @@ } | ||
this.params = {}; | ||
this.query = new URLSearchParams(); | ||
this.query = new URLSearchParams(this.querystring); | ||
@@ -689,0 +689,0 @@ // fragment |
{ | ||
"name": "@jack-henry/web-component-router", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "Web Components Router", | ||
@@ -5,0 +5,0 @@ "main": "router.js", |
@@ -199,14 +199,2 @@ /** | ||
/** | ||
* Adds the query parameters to the Page.js context. | ||
* | ||
* @param {!Context} context | ||
* @param {function():?} next | ||
* @private | ||
*/ | ||
parseQueryString_(context, next) { | ||
context.query = new URLSearchParams(context.querystring); | ||
next(); | ||
} | ||
/** | ||
* Walk the route tree and register route nodes with | ||
@@ -218,4 +206,2 @@ * the Page.js router. | ||
registerRoutes_() { | ||
this.page.register('*', this.parseQueryString_); | ||
this.routeTree_.traverse((node) => { | ||
@@ -222,0 +208,0 @@ if (node === null) { |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
117173
2720