Update lib/std.js

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
Namhyeon Go 2025-11-23 23:59:20 +09:00 committed by GitHub
parent 11fba0e3d0
commit 4e25e13f35
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -74,7 +74,7 @@ function GetResource(ResourceName) {
})();
// @deprecated Enumerator.toArray() is deprecated since version 0.2.7.56. Use Array.from()
if (!Enumerator.prototype.toArray) {
if (typeof Enumerator !== "undefined" && !Enumerator.prototype.toArray) {
Enumerator.prototype.toArray = function() {
return Array.from(this);
};