diff --git a/.changeset/orange-bees-wave.md b/.changeset/orange-bees-wave.md new file mode 100644 index 000000000..d99e59d19 --- /dev/null +++ b/.changeset/orange-bees-wave.md @@ -0,0 +1,5 @@ +--- +"@suid/system": patch +--- + +Reduce accesses to getter properties diff --git a/packages/system/src/createStyled.tsx b/packages/system/src/createStyled.tsx index 49a381c0d..c38d20814 100644 --- a/packages/system/src/createStyled.tsx +++ b/packages/system/src/createStyled.tsx @@ -213,13 +213,11 @@ function createStyled< $component, mergeProps(otherProps, { get children() { - return (otherProps as any).children; + return (inProps as any).children; }, // [review] This property must be omitted on each component individually. get component() { - return is$ComponentStyled() - ? (otherProps as any).component - : null; + return is$ComponentStyled() ? (inProps as any).component : null; }, get as() { return isComponentStyled ? inProps.as : undefined;