Update std.js

This commit is contained in:
Namhyeon Go 2022-01-25 11:40:00 +09:00 committed by GitHub
parent 69ed71377e
commit 1526158068
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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") {
try {
x[c.name] = c.value.toString();
} catch (e) {
x[c.name] = c.value;
}
} else {
var i = 0, d = [];
while (true) {