修复路由不存在时的报错

master
yutent 2024-05-09 16:47:26 +08:00
parent a1c1740166
commit 37dcc51e05
2 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{
"name": "wkitd",
"version": "1.3.7",
"version": "1.3.8",
"type": "module",
"main": "dist/index.js",
"files": [

View File

@ -156,7 +156,7 @@ class Router {
$view.current = route.name
this.#route = route
if (typeof table.component === 'function') {
if (table && typeof table.component === 'function') {
if (!customElements.get(route.name)) {
table.component()
delete table.component //避免多次请求