Skip to content
This repository was archived by the owner on Oct 9, 2025. It is now read-only.

Commit 5f47e84

Browse files
committed
fix: illegal invocation on fetch
1 parent dde7e11 commit 5f47e84

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/lib/types.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,15 @@ export abstract class PostgrestBuilder<T> implements PromiseLike<PostgrestRespon
6262

6363
constructor(builder: PostgrestBuilder<T>) {
6464
Object.assign(this, builder)
65+
let _fetch: Fetch
6566
if (builder.fetch) {
66-
this.fetch = builder.fetch
67+
_fetch = builder.fetch
6768
} else if (typeof fetch === 'undefined') {
68-
this.fetch = crossFetch
69+
_fetch = crossFetch
6970
} else {
70-
this.fetch = fetch
71+
_fetch = fetch
7172
}
73+
this.fetch = (...args) => _fetch(...args)
7274
}
7375

7476
/**

0 commit comments

Comments
 (0)