Skip to content

Commit

Permalink
move it back to allow for mocking
Browse files Browse the repository at this point in the history
  • Loading branch information
Andarist committed Jun 13, 2024
1 parent 7b5bab3 commit c3c43fa
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions packages/react/src/emotion-element.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@ let typePropName = '__EMOTION_TYPE_PLEASE_DO_NOT_USE__'

let labelPropName = '__EMOTION_LABEL_PLEASE_DO_NOT_USE__'

let runtimeAutoLabel =
process.env.NODE_ENV !== 'production' &&
typeof globalThis !== 'undefined' &&
!!globalThis.EMOTION_RUNTIME_AUTO_LABEL

export const createEmotionProps = (
type /*: React.ElementType */,
props /*: Object */
Expand Down Expand Up @@ -52,7 +47,9 @@ export const createEmotionProps = (
// Even if the flag is set, we still don't compute the label if it has already
// been determined by the Babel plugin.
if (
runtimeAutoLabel &&
process.env.NODE_ENV !== 'production' &&
typeof globalThis !== 'undefined' &&
!!globalThis.EMOTION_RUNTIME_AUTO_LABEL &&
!!props.css &&
(typeof props.css !== 'object' ||
typeof props.css.name !== 'string' ||
Expand Down

0 comments on commit c3c43fa

Please sign in to comment.