diff --git a/package.json b/package.json index 4744f89..ad90aec 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "wkitd", - "version": "1.3.7", + "version": "1.3.8", "type": "module", "main": "dist/index.js", "files": [ diff --git a/src/router/router-engine.js b/src/router/router-engine.js index 59d4fce..eb94fbf 100644 --- a/src/router/router-engine.js +++ b/src/router/router-engine.js @@ -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 //避免多次请求