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", "name": "@tp/tp-router",
"version": "1.0.4", "version": "1.0.5",
"description": "", "description": "",
"main": "tp-router.js", "main": "tp-router.js",
"scripts": { "scripts": {

View File

@ -184,12 +184,12 @@ export class TpRouter extends LitElement {
} }
const keys = []; const keys = [];
const r = pathToRegexp(path, keys); const parsed = pathToRegexp(path, keys);
r.keys = keys; parsed.keys = keys;
this.routes[namespace][path] = { this.routes[namespace][path] = {
path: path, path: path,
regex: r, regex: parsed,
data: data, data: data,
redirect: redirect, redirect: redirect,
params: {} params: {}