Fix keys.

This commit is contained in:
Peter Kaske 2022-06-15 16:47:23 +02:00
parent 2b68e2b190
commit 6445d528e9
2 changed files with 4 additions and 4 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@tp/tp-router",
"version": "1.0.4",
"version": "1.0.5",
"description": "",
"main": "tp-router.js",
"scripts": {

View File

@ -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: {}