Skip to content
This repository has been archived by the owner on Sep 10, 2023. It is now read-only.

Commit

Permalink
fix: fix do-expression block scope
Browse files Browse the repository at this point in the history
  • Loading branch information
axetroy committed Mar 12, 2018
1 parent 0381652 commit 1b37264
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/evaluate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1189,7 +1189,9 @@ const evaluate_map: EvaluateMap = {
MetaProperty(path) {},
AwaitExpression(path) {},
DoExpression(path) {
return evaluate(path.$child(path.node.body));
const newScope = path.scope.$child("block");
newScope.invasive = true;
return evaluate(path.$child(path.node.body, newScope));
}
};

Expand Down

0 comments on commit 1b37264

Please sign in to comment.