mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 04:27:21 +00:00
add default fetcher fallback for ModuleApi
This commit is contained in:
@@ -26,7 +26,11 @@ export abstract class ModuleApi<Options extends BaseModuleApiOptions = BaseModul
|
|||||||
constructor(
|
constructor(
|
||||||
protected readonly _options: Partial<Options> = {},
|
protected readonly _options: Partial<Options> = {},
|
||||||
protected fetcher?: typeof fetch
|
protected fetcher?: typeof fetch
|
||||||
) {}
|
) {
|
||||||
|
if (!fetcher) {
|
||||||
|
this.fetcher = fetch;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected getDefaultOptions(): Partial<Options> {
|
protected getDefaultOptions(): Partial<Options> {
|
||||||
return {};
|
return {};
|
||||||
|
|||||||
Reference in New Issue
Block a user