From 15261580680a57d9b22a3b9b6be44baf0d7b7aa9 Mon Sep 17 00:00:00 2001 From: "Namhyeon, Go" Date: Tue, 25 Jan 2022 11:40:00 +0900 Subject: [PATCH] Update std.js --- lib/std.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/std.js b/lib/std.js index b4286c8..740ae48 100644 --- a/lib/std.js +++ b/lib/std.js @@ -28,6 +28,7 @@ if (!Function.prototype.GetResource) { } } +// MS JScript Enumerator to Array if (!Enumerator.prototype.toArray) { Enumerator.prototype.toArray = function() { var a = []; @@ -37,7 +38,11 @@ if (!Enumerator.prototype.toArray) { for (; !b.atEnd(); b.moveNext()) { var c = b.item(); if (typeof c.value !== "unknown") { - x[c.name] = c.value; + try { + x[c.name] = c.value.toString(); + } catch (e) { + x[c.name] = c.value; + } } else { var i = 0, d = []; while (true) {