Skip to content

Commit

Permalink
fix: defer function rethrowing undefined (#270)
Browse files Browse the repository at this point in the history
  • Loading branch information
sodiray authored Mar 8, 2023
1 parent 7c6b986 commit 31c1397
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cdn/radash.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ const defer = async (func) => {
const [err, response] = await tryit(func)(register);
for (const { fn, rethrow } of callbacks) {
const [rethrown] = await tryit(fn)(err);
if (rethrow)
if (rethrown && rethrow)
throw rethrown;
}
if (err)
Expand Down
2 changes: 1 addition & 1 deletion cdn/radash.js
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ var radash = (function (exports) {
const [err, response] = await tryit(func)(register);
for (const { fn, rethrow } of callbacks) {
const [rethrown] = await tryit(fn)(err);
if (rethrow)
if (rethrown && rethrow)
throw rethrown;
}
if (err)
Expand Down
Loading

1 comment on commit 31c1397

@vercel
Copy link

@vercel vercel bot commented on 31c1397 Mar 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.