Fixed: Parentheses do not match
This commit is contained in:
parent
101f8ba623
commit
fda9eb26eb
2 changed files with 2 additions and 2 deletions
|
@ -21,7 +21,7 @@
|
|||
alert(responses[0].status); // 200
|
||||
alert(responses[1].status); // 200
|
||||
alert(responses[2]); // TypeError: failed to fetch (text may vary)
|
||||
));
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
|
|
@ -17,7 +17,7 @@ Promise.all(urls.map(url => fetch(url)))
|
|||
for(let response of responses) {
|
||||
alert(`${response.url}: ${response.status}`);
|
||||
}
|
||||
));
|
||||
});
|
||||
```
|
||||
|
||||
The problem is that if any of requests fails, then `Promise.all` rejects with the error, and we loose results of all the other requests.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue