fix corner case in comparisons (#4680)

fixes #4679
This commit is contained in:
Alex Lam S.L
2021-02-24 13:38:44 +00:00
committed by GitHub
parent c885660347
commit a5a958beda
2 changed files with 21 additions and 0 deletions

View File

@@ -3618,6 +3618,8 @@ merge(Compressor.prototype, {
return this.left.is_defined(compressor) && this.right.is_defined(compressor);
case "||":
return this.left.is_truthy() || this.right.is_defined(compressor);
case "??":
return this.left.is_defined(compressor) || this.right.is_defined(compressor);
default:
return true;
}