Skip to content

Commit

Permalink
array out of loop
Browse files Browse the repository at this point in the history
  • Loading branch information
nikoloza committed Jan 29, 2025
1 parent 5d4f446 commit 5b439d1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/element/utils/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@ export const createValidDomqlObjectFromSugar = (el, parent, key, options) => {
props: {},
define: {}
}

const allowedKeys = ['data', 'state', 'attr', 'if']

for (const k in el) {
const value = el[k]

const isComponent = checkIfKeyIsComponent(k)
const isRegistry = REGISTRY[k]
const allowedKeys = ['data', 'state', 'attr', 'if']
if (isComponent || isRegistry || allowedKeys.includes(k)) {
newElem[k] = value
} else {
Expand Down

0 comments on commit 5b439d1

Please sign in to comment.