File tree 1 file changed +2
-2
lines changed
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>(
96
96
tag : Tag = 'div' as Tag ,
97
97
{ shouldForwardProp = isPropValid , ...config } : StyledOptions & StyleConfig < Variants > = { } ,
98
98
) {
99
- const tw = this || defaultTW
99
+ const tw = typeof this == 'function' ? this : defaultTW
100
100
101
101
const component = style ( config )
102
102
@@ -114,7 +114,7 @@ export function styled<Tag extends React.ElementType, Variants>(
114
114
115
115
const sc = React . forwardRef (
116
116
< 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 > ,
118
118
ref : React . ForwardedRef < any > ,
119
119
) =>
120
120
React . createElement ( as , {
You can’t perform that action at this time.
0 commit comments