diff --git a/package.json b/package.json index d5a1ea2..de98b2b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@tp/tp-router", - "version": "1.0.4", + "version": "1.0.5", "description": "", "main": "tp-router.js", "scripts": { diff --git a/tp-router.js b/tp-router.js index bb978b9..55f50f1 100644 --- a/tp-router.js +++ b/tp-router.js @@ -184,12 +184,12 @@ export class TpRouter extends LitElement { } const keys = []; - const r = pathToRegexp(path, keys); - r.keys = keys; + const parsed = pathToRegexp(path, keys); + parsed.keys = keys; this.routes[namespace][path] = { path: path, - regex: r, + regex: parsed, data: data, redirect: redirect, params: {}