From fda9eb26eb46cae1ccccab38cf433cf11555e7bc Mon Sep 17 00:00:00 2001 From: upupming Date: Fri, 20 Jul 2018 23:10:09 +0800 Subject: [PATCH] Fixed: Parentheses do not match --- .../01-promise-errors-as-results/source.view/index.html | 2 +- 6-async/04-promise-api/01-promise-errors-as-results/task.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/6-async/04-promise-api/01-promise-errors-as-results/source.view/index.html b/6-async/04-promise-api/01-promise-errors-as-results/source.view/index.html index 241b09ad4a..c760ad8cd5 100644 --- a/6-async/04-promise-api/01-promise-errors-as-results/source.view/index.html +++ b/6-async/04-promise-api/01-promise-errors-as-results/source.view/index.html @@ -21,7 +21,7 @@ alert(responses[0].status); // 200 alert(responses[1].status); // 200 alert(responses[2]); // TypeError: failed to fetch (text may vary) - )); + }); diff --git a/6-async/04-promise-api/01-promise-errors-as-results/task.md b/6-async/04-promise-api/01-promise-errors-as-results/task.md index 4d53cbc169..d6904f1bd4 100644 --- a/6-async/04-promise-api/01-promise-errors-as-results/task.md +++ b/6-async/04-promise-api/01-promise-errors-as-results/task.md @@ -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.