Skip to content

Commit a68fcd6

Browse files
authored
fix: proper usage of isomorphic URL
I'm using WHATWG `URL` to build the URL + query parameters. But I used it from Node's built-in `url` module, which clearly [doesn't exist in the browser](https://codesandbox.io/s/vigilant-moon-1o4g9). Rookie mistake! `URL` is also [available globally](https://nodejs.org/api/url.html#url_class_url) in Node, so I'm removing the import to make this work in the browser.
1 parent d2f944a commit a68fcd6

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

src/builder.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import fetch from 'isomorphic-unfetch'
2-
import { URL } from 'url'
32

43
// https://postgrest.org/en/stable/api.html?highlight=options#errors-and-http-status-codes
54
interface PostgrestError {

0 commit comments

Comments
 (0)