mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 12:37:20 +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(
|
||||
protected readonly _options: Partial<Options> = {},
|
||||
protected fetcher?: typeof fetch
|
||||
) {}
|
||||
) {
|
||||
if (!fetcher) {
|
||||
this.fetcher = fetch;
|
||||
}
|
||||
}
|
||||
|
||||
protected getDefaultOptions(): Partial<Options> {
|
||||
return {};
|
||||
|
||||
Reference in New Issue
Block a user