Skip to content

Commit

Permalink
fix: fix the messed up condition
Browse files Browse the repository at this point in the history
  • Loading branch information
mgadewoll committed Apr 26, 2024
1 parent 03f6eb9 commit 6c1c416
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .storybook/addons/code-snippet/decorator/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ export const getEmotionComponentDisplayName = (
const displayName = getElementDisplayName(node);

if (
typeof displayName === 'string' &&
(displayName.match(/^(Emotion)(\w)*/g) ||
node.props.hasOwnProperty('__EMOTION_TYPE_PLEASE_DO_NOT_USE__'))
(typeof displayName === 'string' &&
displayName.match(/^(Emotion)(\w)*/g)) ||
node.props.__EMOTION_TYPE_PLEASE_DO_NOT_USE__ != null
) {
// we need to rely here on the reference Emotion stores to know what component this actually is
const replacementName =
Expand Down

0 comments on commit 6c1c416

Please sign in to comment.