diff --git a/packages/pigment-css-react/src/utils/remove-prop-types-plugin.ts b/packages/pigment-css-react/src/utils/remove-prop-types-plugin.ts index 5c01909da42f5b..703fe989b249a9 100644 --- a/packages/pigment-css-react/src/utils/remove-prop-types-plugin.ts +++ b/packages/pigment-css-react/src/utils/remove-prop-types-plugin.ts @@ -14,7 +14,7 @@ export const removePropTypesPlugin = declare<{}>((api) => { if (!property.isIdentifier({ name: 'propTypes' })) { return; } - if (path.parentPath.isExpressionStatement() || path.parentPath.isConditionalExpression()) { + if (path.parentPath.isExpressionStatement()) { path.parentPath.remove(); } },