From 80382c8b39788353071e23a16f9bed3deb410b3a Mon Sep 17 00:00:00 2001 From: Angelos Chalaris Date: Sat, 3 Feb 2018 11:29:27 +0200 Subject: [PATCH] Revert changes to chainAsync.md --- snippets/chainAsync.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/snippets/chainAsync.md b/snippets/chainAsync.md index f179ff4f8..10bbf6613 100644 --- a/snippets/chainAsync.md +++ b/snippets/chainAsync.md @@ -4,12 +4,10 @@ Chains asynchronous functions. Loop through an array of functions containing asynchronous events, calling `next` when each asynchronous event has completed. -The tenerary function checks the next function exists before calling it, otherwise it will exit. - ```js const chainAsync = fns => { let curr = 0; - const next = () => (fns[curr] ? fns[curr++](next) : false); + const next = () => fns[curr++](next); next(); }; ```