File tree Expand file tree Collapse file tree 1 file changed +1
-1
lines changed
Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Original file line number Diff line number Diff line change @@ -76,7 +76,6 @@ export function createStyled<Theme extends AnyTheme>() {
7676 ( props : PropsWithChildren < ThemedProps & AnyStyleProps & AsComponentProps > , ref : React . ForwardedRef < unknown > ) => {
7777 try {
7878 const theme = useContext ( ThemeContext )
79- const CastedComponent = ( props . as ?? origin ) as AnyComponent
8079 let propsForElement : ThemedProps = Object . assign ( { } , props , { theme, ref } )
8180 let style : StyleProp < UnknownStyles > = fixedStyle
8281
@@ -94,6 +93,7 @@ export function createStyled<Theme extends AnyTheme>() {
9493 propsForElement . style = style
9594 propsForElement . theme = props . theme
9695
96+ const CastedComponent = ( propsForElement . as ?? origin ) as AnyComponent
9797 return createElement ( CastedComponent , propsForElement )
9898 } catch ( error : unknown ) {
9999 injectReciverPathToStack ( error , meta ?. reciverFrames )
You can’t perform that action at this time.
0 commit comments