Skip to content

Commit

Permalink
improve: simplify function
Browse files Browse the repository at this point in the history
  • Loading branch information
fago committed Dec 24, 2024
1 parent 0a95938 commit e81c4da
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions src/runtime/composables/useDrupalCe/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -293,18 +293,7 @@ export const useDrupalCe = () => {
// Handle array of custom elements
if (Array.isArray(customElements)) {
return customElements.map((customElement) => {
if (typeof customElement === 'string') {
return {
template: `<div v-html="content"></div>`,
data() {
return {
content: customElement
}
}
}
}
const resolvedElement = resolveCustomElement(customElement.element)
return resolvedElement ? h(resolvedElement, customElement) : null
return renderCustomElements(customElement)
})
}

Expand Down

0 comments on commit e81c4da

Please sign in to comment.