Skip to content

Commit

Permalink
fix: Uncaught (in promise)
Browse files Browse the repository at this point in the history
  • Loading branch information
dineug committed Dec 23, 2023
1 parent e023e34 commit fc66492
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/go/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dineug/go",
"version": "0.1.7",
"version": "0.1.8",
"description": "Promise Extension Library",
"type": "module",
"main": "./dist/go.min.js",
Expand Down
3 changes: 3 additions & 0 deletions packages/go/src/go.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ export function go<F extends AnyCallback>(
}
}) as Promise<GoReturnType<F>>;

// fix: Uncaught (in promise)
promise.catch(() => {});

attachCancel(promise, () => {
canceled = true;
cancelAndReject?.();
Expand Down

0 comments on commit fc66492

Please sign in to comment.