@babel/plugin-transform-typeof-symbol
Advanced tools
Comparing version 7.0.0-beta.38 to 7.0.0-beta.39
@@ -47,7 +47,5 @@ "use strict"; | ||
if (arg.isIdentifier() && !path.scope.hasBinding(arg.node.name)) { | ||
var undefLiteral = _core.types.stringLiteral("undefined"); | ||
var unary = _core.types.unaryExpression("typeof", _core.types.cloneNode(node.argument)); | ||
var unary = _core.types.unaryExpression("typeof", node.argument); | ||
path.replaceWith(_core.types.conditionalExpression(_core.types.binaryExpression("===", unary, undefLiteral), undefLiteral, call)); | ||
path.replaceWith(_core.types.conditionalExpression(_core.types.binaryExpression("===", unary, _core.types.stringLiteral("undefined")), _core.types.stringLiteral("undefined"), call)); | ||
} else { | ||
@@ -54,0 +52,0 @@ path.replaceWith(call); |
{ | ||
"name": "@babel/plugin-transform-typeof-symbol", | ||
"version": "7.0.0-beta.38", | ||
"version": "7.0.0-beta.39", | ||
"description": "This transformer wraps all typeof expressions with a method that replicates native behaviour. (ie. returning “symbol” for symbols)", | ||
@@ -12,8 +12,8 @@ "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-typeof-symbol", | ||
"peerDependencies": { | ||
"@babel/core": "7.0.0-beta.38" | ||
"@babel/core": "7.0.0-beta.39" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "7.0.0-beta.38", | ||
"@babel/helper-plugin-test-runner": "7.0.0-beta.38" | ||
"@babel/core": "7.0.0-beta.39", | ||
"@babel/helper-plugin-test-runner": "7.0.0-beta.39" | ||
} | ||
} |
3317
42