diff --git a/src/index.ts b/src/index.ts index 1451b1b..6a4701e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -40,30 +40,30 @@ export type StyledComponent

= React.ForwardR const styled =

= {}>( // eslint-disable-line @typescript-eslint/no-empty-object-type Comp: React.ComponentType

, - config: Config = {} + config: Config = Object.create(null) ) => ( componentStyle?: ComponentStyle ): StyledComponent, S> => { const { name, - props: factoryProps = {}, - style: factoryStyle = {}, - fixedStyle = {}, + props: factoryProps = Object.create(null), + style: factoryStyle = Object.create(null), + fixedStyle = Object.create(null), ...opts } = config const Styled = React.forwardRef & { children?: React.ReactNode }>( (props, ref) => { const { childRef, children, ...restProps } = props - const { comp, child, childProps = {} } = opts + const { comp, child, childProps = Object.create(null) } = opts const attrs = opts.attrs const attrsResult = attrs ? typeof attrs === 'function' ? attrs(restProps as P) : attrs - : {} + : Object.create(null) let style = { ...factoryStyle,