Fix bug with evaluating an expression in it's own binding
This commit is contained in:
@@ -360,7 +360,9 @@ export function _resolve(dangerous?, resolved?): ?NodePath {
|
||||
if (binding.kind === "module") return;
|
||||
|
||||
if (binding.path !== this) {
|
||||
return binding.path.resolve(dangerous, resolved);
|
||||
let ret = binding.path.resolve(dangerous, resolved);
|
||||
if (this.find(parent => parent.node === ret.node)) return;
|
||||
return ret;
|
||||
}
|
||||
} else if (this.isTypeCastExpression()) {
|
||||
return this.get("expression").resolve(dangerous, resolved);
|
||||
|
||||
Reference in New Issue
Block a user