修复路由不存在时的报错
parent
a1c1740166
commit
37dcc51e05
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "wkitd",
|
||||
"version": "1.3.7",
|
||||
"version": "1.3.8",
|
||||
"type": "module",
|
||||
"main": "dist/index.js",
|
||||
"files": [
|
||||
|
|
|
@ -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 //避免多次请求
|
||||
|
|
Loading…
Reference in New Issue