diff --git a/core/src/main/java/org/teavm/backend/javascript/templating/TemplatingAstWriter.java b/core/src/main/java/org/teavm/backend/javascript/templating/TemplatingAstWriter.java index be2dd7ebe..10bb9a2ed 100644 --- a/core/src/main/java/org/teavm/backend/javascript/templating/TemplatingAstWriter.java +++ b/core/src/main/java/org/teavm/backend/javascript/templating/TemplatingAstWriter.java @@ -127,7 +127,7 @@ public class TemplatingAstWriter extends AstWriter { if (classInitializerInfo == null || classInitializerInfo.isDynamicInitializer(className)) { writer.appendClassInit(className); } else { - writer.append("(()").ws().append("=>").ws().append("{})"); + writer.append("(()").sameLineWs().append("=>").ws().append("{})"); } return true; } diff --git a/jso/impl/src/main/java/org/teavm/jso/impl/JSAliasRenderer.java b/jso/impl/src/main/java/org/teavm/jso/impl/JSAliasRenderer.java index 939dcd27d..00f9a6860 100644 --- a/jso/impl/src/main/java/org/teavm/jso/impl/JSAliasRenderer.java +++ b/jso/impl/src/main/java/org/teavm/jso/impl/JSAliasRenderer.java @@ -64,7 +64,7 @@ class JSAliasRenderer implements RendererListener, MethodContributor { writer.startVariableDeclaration().appendFunction("$rt_jso_marker") .appendGlobal("Symbol").append("('jsoClass')").endDeclaration(); - writer.append("(()").ws().append("=>").ws().append("{").softNewLine().indent(); + writer.append("(()").sameLineWs().append("=>").ws().append("{").softNewLine().indent(); writer.append("let c;").softNewLine(); var exportedNamesByClass = new HashMap(); for (var className : classSource.getClassNames()) {