Skip to content

Commit 50741db

Browse files
committed
Fix other components with styledComponentId
Any component wrapped in a forwardRef could have a styledComponentId, since this is a well-known hack.
1 parent 07ef3e8 commit 50741db

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/render/styledComponent.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ const computeAttrsProps = (input: Attr[], props: any, theme: any): any => {
8383
/** Checks whether a ForwardRefElement is a StyledComponent element */
8484
export const isStyledElement = (element: ForwardRefElement): boolean %checks =>
8585
styledComponents !== undefined &&
86+
typeof element.type.target !== undefined &&
8687
typeof element.type.styledComponentId === 'string'
8788

8889
/** This is an optimised faux mounting strategy for StyledComponents.

0 commit comments

Comments
 (0)