Skip to content

Commit

Permalink
lib: propagate abortsignal reason in new AbortError constructor in blob
Browse files Browse the repository at this point in the history
Signed-off-by: James M Snell <jasnell@gmail.com>

PR-URL: #41008
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
  • Loading branch information
jasnell authored and targos committed Aug 1, 2022
1 parent e04c8a4 commit 36dd39d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/internal/blob.js
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ class Blob {

job.ondone = (err, ab) => {
if (err !== undefined)
return reject(new AbortError());
return reject(new AbortError(undefined, { cause: err }));
resolve(ab);
};
this[kArrayBufferPromise] =
Expand Down

0 comments on commit 36dd39d

Please sign in to comment.