Fix route params.
This commit is contained in:
parent
73a8758250
commit
3aa7b181c9
@ -183,9 +183,13 @@ export class TpRouter extends LitElement {
|
||||
this.routes[namespace] = {};
|
||||
}
|
||||
|
||||
const keys = [];
|
||||
const r = pathToRegexp(path, keys);
|
||||
r.keys = keys;
|
||||
|
||||
this.routes[namespace][path] = {
|
||||
path: path,
|
||||
regex: pathToRegexp(path),
|
||||
regex: r,
|
||||
data: data,
|
||||
redirect: redirect,
|
||||
params: {}
|
||||
|
Loading…
Reference in New Issue
Block a user