fix crash in may_throw() (#2932)

fixes #2931
This commit is contained in:
Alex Lam S.L
2018-02-18 21:51:27 +08:00
committed by GitHub
parent 2351a672ea
commit 4b5993ff15
2 changed files with 24 additions and 1 deletions

View File

@@ -2864,7 +2864,7 @@ merge(Compressor.prototype, {
return this.value.may_throw(compressor);
});
def(AST_Return, function(compressor){
return this.value.may_throw(compressor);
return this.value && this.value.may_throw(compressor);
});
def(AST_Sequence, function(compressor){
return any(this.expressions, compressor);