-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Description
What version of async are you using?
^3.2.0
Which environment did the issue occur in (Node version/browser version)
Node: v12.16.3
npm: 6.14.4
Chrome: 84.0.4147.125
OS: Ubuntu in WSL2
Create-React-App:
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-scripts": "3.4.3"
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.4 LTS
Release: 18.04
Codename: bionic
What did you do? Please include a minimal reproducable case illustrating issue.
The minimal example: Combo819/react-async-issue;
The queue will stop processing the remaining items if the function of the queue is an async function and it's rejected in React production version.
const q = queue(async function (task, callback) {
await new Promise((resolve,reject)=>{
//some other code
reject();
});
callback()
}, concurrency);
It will keep processing the remaining items in the Development environment but throws an error in the production version that generated by running npm run build.
If I click on that add one button, the result in Development version is like this:

What was the actual result?
But in the production version, though I click on the button for multiple times, only items before that reject shown.

Note
I also tested the same code in Windows 10 and the same Chrome, same React version, with Node v14.0.0 and npm v6.14.4.
In Development version:

It didn't process the remaining items. But it has a different error message.
In Production version:

It has the error message