Fix keys.
This commit is contained in:
parent
2b68e2b190
commit
6445d528e9
@ -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": {
|
||||||
|
@ -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: {}
|
||||||
|
Loading…
Reference in New Issue
Block a user