From f467c0dc6940b6bb46ef2942175324333260a9af Mon Sep 17 00:00:00 2001 From: Marcos Passos Date: Fri, 18 Nov 2022 20:37:47 -0300 Subject: [PATCH] Make SDK lazily loaded (#137) --- src/plug.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/plug.ts b/src/plug.ts index e3c366a1..a61f492b 100644 --- a/src/plug.ts +++ b/src/plug.ts @@ -367,8 +367,6 @@ export class GlobalPlug implements Plug { } public get fetch(): Plug['fetch'] { - const logger = this.sdk.getLogger(); - return this.eap( 'fetch', ( @@ -376,6 +374,7 @@ export class GlobalPlug implements Plug { options: FetchOptions = {}, ): Promise> => { const [id, version] = slotId.split('@') as [string, `${number}` | 'latest' | undefined]; + const logger = this.sdk.getLogger(); return this.sdk .contentFetcher