Skip to content

Commit 136f847

Browse files
committed
fix(MDCRenderer): allow passing component definition to components prop
1 parent 6278d20 commit 136f847

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/runtime/components/MDCRenderer.vue

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -337,13 +337,8 @@ function propsToDataRxBind(key: string, value: any, data: any, documentMeta: MDC
337337
* Resolve component if it's a Vue component
338338
*/
339339
const resolveVueComponent = (component: any) => {
340-
// Check if node is not a native HTML tag
341-
if (!htmlTags.includes(component) && !component?.render && !component?.ssrRender) {
342-
const componentFn = resolveComponent(pascalCase(component), false)
343-
// If component exists
344-
if (typeof componentFn === 'object') {
345-
return componentFn
346-
}
340+
if (typeof component === 'string') {
341+
return htmlTags.includes(component) ? component : resolveComponent(pascalCase(component), false)
347342
}
348343
return component
349344
}

0 commit comments

Comments
 (0)