catch usage of global fetch for nodejs.
fixes https://github.com/fiatjaf/nostr-tools/issues/53
This commit is contained in:
parent
c5b64404f6
commit
c08bdac7a7
6
nip05.ts
6
nip05.ts
|
@ -1,6 +1,10 @@
|
||||||
import {ProfilePointer} from './nip19'
|
import {ProfilePointer} from './nip19'
|
||||||
|
|
||||||
var _fetch = fetch
|
var _fetch: any
|
||||||
|
|
||||||
|
try {
|
||||||
|
_fetch = fetch
|
||||||
|
} catch {}
|
||||||
|
|
||||||
export function useFetchImplementation(fetchImplementation: any) {
|
export function useFetchImplementation(fetchImplementation: any) {
|
||||||
_fetch = fetchImplementation
|
_fetch = fetchImplementation
|
||||||
|
|
Loading…
Reference in New Issue