Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 842bcd6 commit 7be1a2bCopy full SHA for 7be1a2b
src/runtime/components/ContentRenderer.vue
@@ -134,8 +134,11 @@ function resolveVueComponent(component: string | Renderable) {
134
}
135
else if (localComponents.includes(pascalCase(component))) {
136
_component = defineAsyncComponent(() => {
137
- // @ts-expect-error - typescript doesn't know about the import
138
- return import('#content/components').then(m => m[pascalCase(component)]())
+ return import('#content/components')
+ .then((m) => {
139
+ const comp = m[pascalCase(component)] as unknown as () => unknown
140
+ return comp ? comp() : undefined
141
+ })
142
})
143
144
if (typeof _component === 'string') {
0 commit comments