From 083374ee8f675ac0cfacb11a0bbcb1617d2ec8a3 Mon Sep 17 00:00:00 2001 From: siriwatknp Date: Fri, 29 Mar 2024 11:40:43 +0700 Subject: [PATCH] revert change --- .../pigment-css-react/src/utils/remove-prop-types-plugin.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(); } },