If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Promise.all returns already-resolved promises for any combination of non-promises and resolved promises.

UNCONFIRMED
Unassigned

Status

Developer Documentation
JavaScript
P5
normal
UNCONFIRMED
3 months ago
3 months ago

People

(Reporter: trusktr, Unassigned)

Tracking

Details

(URL)

(Reporter)

Description

3 months ago
:: Developer Documentation Request

      Request Type: Correction
     Gecko Version: unspecified
 Technical Contact: 

:: Details

The docs say if Promise.all receives an array of non-promises, it will return an unresolved promise. However, Chrome returns a resolved promise. If all items in the array are any mix of non-promises and resolved promises, or an empty array, then Chrome always returns an already-resolved promise.

Should the docs be corrected? Is Firefox behavior different?

Here's the section I'm referring to: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/all#Asynchronicity_or_synchronicity_of_Promise.all
You need to log in before you can comment on or make changes to this bug.