From 1200354a7bb8fada3896af9f339e42cc41cb273c Mon Sep 17 00:00:00 2001 From: Alexey Andreev Date: Tue, 21 Nov 2017 01:24:00 +0300 Subject: [PATCH] Emit boolean constants as numbers --- .../teavm/backend/javascript/rendering/RenderingContext.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/src/main/java/org/teavm/backend/javascript/rendering/RenderingContext.java b/core/src/main/java/org/teavm/backend/javascript/rendering/RenderingContext.java index 4857219b4..5fbd47cb2 100644 --- a/core/src/main/java/org/teavm/backend/javascript/rendering/RenderingContext.java +++ b/core/src/main/java/org/teavm/backend/javascript/rendering/RenderingContext.java @@ -155,6 +155,8 @@ public class RenderingContext { } } else if (cst instanceof Character) { return Integer.toString((Character) cst); + } else if (cst instanceof Boolean) { + return (Boolean) cst ? "1" : "0"; } else { return cst.toString(); }