File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ export function styled<Tag extends React.ElementType, Variants>(
9696 tag : Tag = 'div' as Tag ,
9797 { shouldForwardProp = isPropValid , ...config } : StyledOptions & StyleConfig < Variants > = { } ,
9898) {
99- const tw = this || defaultTW
99+ const tw = typeof this == 'function' ? this : defaultTW
100100
101101 const component = style ( config )
102102
@@ -114,7 +114,7 @@ export function styled<Tag extends React.ElementType, Variants>(
114114
115115 const sc = React . forwardRef (
116116 < T extends React . ElementType = Tag > (
117- { as = ( tag as unknown ) as T , ...props } : PolymorphicPropsWithRef < StyleProps < Variants > , T > ,
117+ { as = tag as unknown as T , ...props } : PolymorphicPropsWithRef < StyleProps < Variants > , T > ,
118118 ref : React . ForwardedRef < any > ,
119119 ) =>
120120 React . createElement ( as , {
You can’t perform that action at this time.
0 commit comments