mirror of
https://github.com/nbd-wtf/nostr-tools.git
synced 2025-12-09 00:28:51 +00:00
catch usage of global fetch for nodejs.
fixes https://github.com/fiatjaf/nostr-tools/issues/53
This commit is contained in:
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
|
||||||
|
|||||||
Reference in New Issue
Block a user