ulivz / vt

🖼️ A "Post-VuePress Era" Documentation Theme (Deprecation Warning: For a next-gen SSG, please check out Rspress.)
https://vt.insx.dev
MIT License
136 stars 10 forks source link

[bug] TypeError: Cannot read properties of undefined (reading 'map') #28

Closed ulivz closed 2 years ago

ulivz commented 2 years ago

Summary

Once you config a path without children at API page:

{
  title: "API Reference",
  path: "/api/",
},

You'll get following error:

vue.runtime.esm.js?84a7:1897 TypeError: Cannot read properties of undefined (reading 'map')
    at eval (API.vue?a295:25:1)
    at Array.map (<anonymous>)
    at VueComponent.apiGroups (API.vue?a295:21:1)
    at Watcher.get (vue.runtime.esm.js?84a7:4495:1)
    at Watcher.evaluate (vue.runtime.esm.js?84a7:4597:1)
    at VueComponent.computedGetter [as apiGroups] (vue.runtime.esm.js?84a7:4851:1)
    at VueComponent.filtered (API.vue?a295:44:1)
    at Watcher.get (vue.runtime.esm.js?84a7:4495:1)
    at Watcher.evaluate (vue.runtime.esm.js?84a7:4597:1)
    at VueComponent.computedGetter [as filtered] (vue.runtime.esm.js?84a7:4851:1)