From 50573f4f0611f8325a9073e0840218fc74fc8319 Mon Sep 17 00:00:00 2001 From: Alexey Andreev Date: Thu, 30 Aug 2018 11:10:23 +0300 Subject: [PATCH] Prevent minifier from generating NaN function --- .../org/teavm/backend/javascript/rendering/RenderingUtil.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/org/teavm/backend/javascript/rendering/RenderingUtil.java b/core/src/main/java/org/teavm/backend/javascript/rendering/RenderingUtil.java index 4a1d657a4..ecbc05cbf 100644 --- a/core/src/main/java/org/teavm/backend/javascript/rendering/RenderingUtil.java +++ b/core/src/main/java/org/teavm/backend/javascript/rendering/RenderingUtil.java @@ -24,7 +24,8 @@ public final class RenderingUtil { public static final Set KEYWORDS = Collections.unmodifiableSet(new HashSet<>(Arrays.asList("break", "case", "catch", "class", "const", "continue", "debugger", "default", "delete", "do", "else", "export", "extends", "finally", "for", "function", "if", "import", "in", "instanceof", "new", "return", - "super", "switch", "this", "throw", "try", "typeof", "var", "void", "while", "with", "yield"))); + "super", "switch", "this", "throw", "try", "typeof", "var", "void", "while", "with", "yield", + "NaN"))); public static final String VARIABLE_START_CHARS = "abcdefghijklmnopqrstuvwxyz"; public static final String VARIABLE_PART_CHARS = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";