@devwareng/vanilla-ts 1.9.101 → 1.9.102

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -55,7 +55,7 @@ export async function createRouter(DOM: HTMLElement) {
55
55
  for (const route of routeTree) {
56
56
  const regex = new RegExp("^" + route.path.replace(/:([^/]+)/g, "([^/]+)") + "$");
57
57
  const pathname = path.split("?")[0];
58
- if (pathname.match(regex)) return route;
58
+ if (pathname?.match(regex)) return route;
59
59
  }
60
60
  return null;
61
61
  }
package/dist/index.js CHANGED
@@ -55,7 +55,7 @@ export async function createRouter(DOM: HTMLElement) {
55
55
  for (const route of routeTree) {
56
56
  const regex = new RegExp("^" + route.path.replace(/:([^/]+)/g, "([^/]+)") + "$");
57
57
  const pathname = path.split("?")[0];
58
- if (pathname.match(regex)) return route;
58
+ if (pathname?.match(regex)) return route;
59
59
  }
60
60
  return null;
61
61
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devwareng/vanilla-ts",
3
- "version": "1.9.101",
3
+ "version": "1.9.102",
4
4
  "description": "Framework-less TypeScript hooks for SPA development.",
5
5
  "author": "Waren Arapoc Gador",
6
6
  "license": "MIT",