} else if (elseIsEmpty && thenExpr != null) {
// Convert "if (a()) {b()}" => "a()&&b()".
JsBinaryOperation op = new JsBinaryOperation(makeSourceInfo(x,
"Replaced if statement with &&"), JsBinaryOperator.AND,
x.getIfExpr(), thenExpr);
ctx.replaceMe(accept(op.makeStmt()));
} else if (elseIsEmpty && elseStmt != null) {
// Convert "if (a()) {b()} else {}" => "if (a()) {b()}".
JsIf newIf = new JsIf(makeSourceInfo(x, "Pruned empty else statement"),
x.getIfExpr(), thenStmt, null);
ctx.replaceMe(accept(newIf));