fix corner case in booleans (#3659)

fixes #3658
This commit is contained in:
Alex Lam S.L
2019-12-31 09:57:35 +08:00
committed by GitHub
parent 4dbdac9c31
commit 94785e8e14
3 changed files with 129 additions and 35 deletions

View File

@@ -969,6 +969,7 @@ TreeWalker.prototype = {
|| p instanceof AST_DWLoop && p.condition === self
|| p instanceof AST_For && p.condition === self
|| p instanceof AST_If && p.condition === self
|| p instanceof AST_Return && p.in_bool
|| p instanceof AST_UnaryPrefix && p.operator == "!" && p.expression === self) {
return true;
}