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) ) ); }