In the current version, if you pass any type of an object/non-primitive data, like a JavaScript object:
} else if (typeof {key1: 1, key2:2 } === 'object') {
this else-if-statement would trigger, and would try to pass in the object into return Promise.all(), which can only take in an array.
This Pull request changes the check if an item is an object, to something more specific to what the Promise.all() method can accept, which is an array. The suggested change is from:
In the current version, if you pass any type of an object/non-primitive data, like a JavaScript object:
} else if (typeof {key1: 1, key2:2 } === 'object') {
this else-if-statement would trigger, and would try to pass in the object intoreturn Promise.all()
, which can only take in an array.This Pull request changes the check if an item is an object, to something more specific to what the
Promise.all()
method can accept, which is an array. The suggested change is from:to: