rename scope bindings during block scope transform

This commit is contained in:
Andrew Schmadel
2016-02-10 11:44:16 -05:00
parent 77a36633be
commit 307d5c5a0d

View File

@@ -93,7 +93,7 @@ function replace(path, node, scope, remaps) {
let ownBinding = scope.getBindingIdentifier(node.name);
if (ownBinding === remap.binding) {
node.name = remap.uid;
scope.rename(node.name, remap.uid);
} else {
// scope already has it's own binding that doesn't
// match the one we have a stored replacement for