Update solution.md

This commit is contained in:
Tien Pham 2018-11-11 21:04:10 +02:00 committed by GitHub
parent d425110e66
commit a58223c1c3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -12,7 +12,7 @@ Promise.all(
Here we have an array of `fetch(...)` promises that goes to `Promise.all`. Here we have an array of `fetch(...)` promises that goes to `Promise.all`.
We can't change the way `Promise.all` works: if it detects an error, then it rejects with it. So we need to prevent any error from occuring. Instead, if a `fetch` error happens, we need to treat it as a "normal" result. We can't change the way `Promise.all` works: if it detects an error, then it rejects with it. So we need to prevent any error from occurring. Instead, if a `fetch` error happens, we need to treat it as a "normal" result.
Here's how: Here's how: