Skip to content

Commit

Permalink
chore(warning): fix warning (#887)
Browse files Browse the repository at this point in the history
  • Loading branch information
stavares843 authored Nov 27, 2024
1 parent 63d068a commit 0d10d8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/utils/CancellablePromise.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export function create_cancellable_handler(handler: (isCancelled: () => boolean)
const promise = new Promise((resolve, reject) => {
state.cancel = reason => {
isCancelled = true
if (asReject) reject(reason)
if (asReject) reject(new Error(reason))
else resolve(undefined)
}
})
Expand Down

0 comments on commit 0d10d8d

Please sign in to comment.