From 14a84ee3bb40f121e55cc5c2268cbc03a7e2e7a1 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Mon, 13 Jun 2022 03:48:19 +0300 Subject: [PATCH] tweaks... Signed-off-by: Alex A. Naanou --- Promise.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Promise.js b/Promise.js index b90431e..89d015b 100644 --- a/Promise.js +++ b/Promise.js @@ -178,14 +178,17 @@ object.Constructor('IterablePromise', Promise, { //elem.then(handler) elem .then(handler) + //* XXX EXPEREMENTAL: STOP... .catch(function(err){ stop = err - if(err === Array.STOP - || err instanceof Array.STOP){ + if(Array.STOP + && (err === Array.STOP + || err instanceof Array.STOP)){ return 'value' in err ? err.value : [] } throw err }) + //*/ : elem instanceof Array ? handler(elem) // NOTE: we keep things that do not need protecting