[2023/09/14: Inchar] solve the waitever.
This commit is contained in:
parent
4dcec776da
commit
9870c39857
|
@ -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([]);
|
||||
|
|
Loading…
Reference in New Issue