mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 16:14:10 -08:00
Fixes error generating minfied JS
This commit is contained in:
parent
3496907f0e
commit
4c70cf6828
|
@ -393,13 +393,14 @@ public class Renderer implements ExprVisitor, StatementVisitor {
|
|||
part.acceptVisitor(this);
|
||||
}
|
||||
if (!statement.getAlternative().isEmpty()) {
|
||||
writer.outdent().append("}").ws().append("else").ws();
|
||||
writer.outdent().append("}").ws();
|
||||
if (statement.getAlternative().size() == 1 &&
|
||||
statement.getAlternative().get(0) instanceof ConditionalStatement) {
|
||||
statement = (ConditionalStatement)statement.getAlternative().get(0);
|
||||
writer.append("else ");
|
||||
continue;
|
||||
}
|
||||
writer.append("{").indent().softNewLine();
|
||||
writer.append("else").ws().append("{").indent().softNewLine();
|
||||
for (Statement part : statement.getAlternative()) {
|
||||
part.acceptVisitor(this);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user