From dc2da3097e7c917df6736a478493abd395daef37 Mon Sep 17 00:00:00 2001 From: neoarma <46651868+neoarma@users.noreply.github.com> Date: Mon, 15 Apr 2019 22:46:25 +1200 Subject: [PATCH] Update arguments order of `then` The first argument should be for handling a successful result, and the second for error. --- 1-js/11-async/06-promisify/article.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1-js/11-async/06-promisify/article.md b/1-js/11-async/06-promisify/article.md index 960b5fe1..e72329ce 100644 --- a/1-js/11-async/06-promisify/article.md +++ b/1-js/11-async/06-promisify/article.md @@ -102,7 +102,7 @@ function promisify(f, manyArgs = false) { // usage: f = promisify(f, true); -f(...).then(err => ..., arrayOfResults => ...) +f(...).then(arrayOfResults => ..., err => ...) ``` In some cases, `err` may be absent at all: `callback(result)`, or there's something exotic in the callback format, then we can promisify such functions manually.