From 54dca841f10cd9629c85e9fdeecccfbf8c239112 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Fri, 28 Mar 2025 11:30:51 +0100 Subject: [PATCH] Set props as optional --- src/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/index.ts b/src/index.ts index fc8d121..79b3a8f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -28,15 +28,15 @@ export class Codex { private _debug: CodexDebug | null; private readonly auth: FetchAuth = {}; - constructor(url: string, { auth }: CodexProps) { + constructor(url: string, options?: CodexProps) { this.url = url; this._marketplace = null; this._data = null; this._node = null; this._debug = null; - if (auth) { - this.auth = auth; + if (options?.auth) { + this.auth = options?.auth; } }