From 6d3d668aa0ccf65c601ca04a0b18ddbe6a64a3a8 Mon Sep 17 00:00:00 2001 From: Ilya Kantor Date: Sun, 19 Jun 2022 17:42:12 +0300 Subject: [PATCH] minor fixes --- 1-js/11-async/02-promise-basics/article.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/1-js/11-async/02-promise-basics/article.md b/1-js/11-async/02-promise-basics/article.md index 344eedab..a1b1bd67 100644 --- a/1-js/11-async/02-promise-basics/article.md +++ b/1-js/11-async/02-promise-basics/article.md @@ -278,9 +278,10 @@ There are important differences: To summarize: - A `finally` handler doesn't get the outcome of the previous handler (it has no arguments). This outcome is passed through instead, to the next suitable handler. -- If a `finally` handler returns something, it's ignored. The notable exception is when `finally` throws an error, then the execution goes to a nearest error handler. +- If a `finally` handler returns something, it's ignored. +- When `finally` throws an error, then the execution goes to a nearest error handler. -That's all fine if we use `finally` the right way, how it's supposed to be used: for generic cleanup procedures. +These features are helpful and make things work just the right way if we `finally` how it's supposed to be used: for generic cleanup procedures. ````smart header="We can attach handlers to settled promises" If a promise is pending, `.then/catch/finally` handlers wait for its outcome.