Skip to content

Commit

Permalink
Added support for dynamic components via is-attribute.
Browse files Browse the repository at this point in the history
  • Loading branch information
michielvandergeest committed Feb 19, 2024
1 parent 4560870 commit 0dc56c1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/lib/codegenerator/generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,11 @@ const generateComponentCode = function (

renderCode.push(`
if(!${elm}) {
${elm} = (context.components && context.components['${
const componentType = props${counter}['is'] || '${
templateObject[Symbol.for('componentType')]
}'] || component[Symbol.for('components')]['${
templateObject[Symbol.for('componentType')]
}'] || (() => { console.error('component ${
}'
${elm} = (context.components && context.components[componentType] || component[Symbol.for('components')][componentType] || (() => { console.error('component ${
templateObject[Symbol.for('componentType')]
} not found')})).call(null, {props: props${counter}}, ${parent}, component)
if (${elm}[Symbol.for('slots')][0]) {
Expand Down

0 comments on commit 0dc56c1

Please sign in to comment.