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));