Skip to content

Commit

Permalink
remove Object.freeze
Browse files Browse the repository at this point in the history
  • Loading branch information
benStre committed Oct 28, 2024
1 parent 2d81b73 commit 995f3c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jsx/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,15 +142,15 @@ export function getParseJSX(context: DOMContext, domUtils: DOMUtils) {
set_default_attributes = (type as any)[SET_DEFAULT_ATTRIBUTES] ?? true;
if (set_default_children) delete params.children;

element = new type(set_default_children ? Object.freeze(props) : Object.freeze({...props, children})) // uix component
element = new type(set_default_children ? props : {...props, children}) // uix component
}
// function component
else {
set_default_children = (type as any)[SET_DEFAULT_CHILDREN];
set_default_attributes = (type as any)[SET_DEFAULT_ATTRIBUTES];
if (set_default_children) delete params.children;

element = type(Object.freeze(params))
element = type(params)

// async component, use uix-placeholder
if (element instanceof Promise) {
Expand Down

0 comments on commit 995f3c6

Please sign in to comment.