[2023/09/14: Inchar] solve the waitever.

This commit is contained in:
Rintim 2023-09-14 00:29:58 +08:00
parent 4dcec776da
commit 9870c39857
1 changed files with 2 additions and 1 deletions

View File

@ -7845,7 +7845,8 @@
value:function allSettled(ary){
const Promise = this;
return new Promise((resolve, reject) => {
if (Object.prototype.toString.call(arr) != "[object Array]")
// if (Object.prototype.toString.call(arr) != "[object Array]")
if (!Array.isArray(ary))
return reject(new TypeError(`${typeof arr} ${ary} is not iterable(cannot read property Symbol(Symbol.iterator))`));
let args = Array.prototype.slice.call(ary);
if (args.length == 0) return resolve([]);