From 586721462c0a90198b2b0119f52812857d1a2852 Mon Sep 17 00:00:00 2001 From: Eric Vergnaud Date: Sat, 13 Feb 2021 15:09:34 +0800 Subject: [PATCH] Fix #3078 --- runtime/JavaScript/src/antlr4/Utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/JavaScript/src/antlr4/Utils.js b/runtime/JavaScript/src/antlr4/Utils.js index 8eed91a2c..66cf13152 100644 --- a/runtime/JavaScript/src/antlr4/Utils.js +++ b/runtime/JavaScript/src/antlr4/Utils.js @@ -4,7 +4,7 @@ */ function arrayToString(a) { - return "[" + a.join(", ") + "]"; + return Array.isArray(a) ? ("[" + a.join(", ") + "]") : "null"; } String.prototype.seed = String.prototype.seed || Math.round(Math.random() * Math.pow(2, 32));