Skip to content

Commit 9e872dc

Browse files
committed
fix: bind withResolvers to Promise if it exist
1 parent 6633730 commit 9e872dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils/promiseWithResolvers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export const promiseWithResolvers =
22
// @ts-expect-error TODO: replace with `Promise.withResolvers()` once it lands in node
3-
Promise.withResolvers ||
3+
Promise.withResolvers?.bind(Promise) ||
44
function promiseWithResolvers<T>() {
55
let resolve!: (t: T) => void
66
let reject!: (err: unknown) => void

0 commit comments

Comments
 (0)