From 6445d528e9fd20414147d7b24cc880836efba857 Mon Sep 17 00:00:00 2001 From: Peter Kaske Date: Wed, 15 Jun 2022 16:47:23 +0200 Subject: [PATCH] Fix keys. --- package.json | 2 +- tp-router.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) 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: {}