From e9a5e0962cfce087527ee583f619325c99ad8448 Mon Sep 17 00:00:00 2001 From: Trevor McCauley Date: Wed, 15 Dec 2021 18:33:08 -0500 Subject: [PATCH] Fix badCallback will only throw if iterable has items This is consistent with Array.from where `Array.from([], ()=>{throw 1})` will not throw but `Array.from([1], ()=>{throw 1})` will. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6ae9ca4..e91bd60 100644 --- a/README.md +++ b/README.md @@ -187,7 +187,7 @@ Array.fromAsync(badIterable); Array.fromAsync(genError()); Array.fromAsync(genRejection()); Array.fromAsync(genErrorAsync()); -Array.fromAsync([], badCallback); +Array.fromAsync([1], badCallback); BadConstructor.call(Array.fromAsync, []); // These create promises that will reject with TypeErrors. Array.fromAsync(null);