ensure opts.polyfill = false behaves correctly for runtime-transformer

This commit is contained in:
guybedford
2016-01-06 00:26:45 +02:00
parent 2516b7570f
commit d5f71d4a32

View File

@@ -33,6 +33,8 @@ export default function ({ types: t }) {
return;
}
if (state.opts.polyfill === false) return;
if (t.isMemberExpression(parent)) return;
if (!has(definitions.builtins, node.name)) return;
if (scope.getBindingIdentifier(node.name)) return;