From b73cdc72df8216fcd92a96208dbdc3bc665947c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laura=20Gonz=C3=A1lez?= Date: Thu, 5 Dec 2019 17:57:45 +0000 Subject: [PATCH] Update wrap-warning-with-env-check.js --- scripts/babel/wrap-warning-with-env-check.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/scripts/babel/wrap-warning-with-env-check.js b/scripts/babel/wrap-warning-with-env-check.js index f40d95d9a4..7c0fedee4a 100644 --- a/scripts/babel/wrap-warning-with-env-check.js +++ b/scripts/babel/wrap-warning-with-env-check.js @@ -50,13 +50,8 @@ module.exports = function(babel, options) { newNode[SEEN_SYMBOL] = true; path.replaceWith( t.ifStatement( - DEV_EXPRESSION, - t.blockStatement([ - t.ifStatement( - t.unaryExpression('!', condition), - t.expressionStatement(newNode) - ), - ]) + t.unaryExpression('!', condition), + t.expressionStatement(newNode) ) ); }