From 311c38232aaba0d06fc107a21e26ab906c7593a2 Mon Sep 17 00:00:00 2001 From: Warren Parad Date: Mon, 30 Sep 2024 23:00:10 +0200 Subject: [PATCH] Fix ?. conversion. --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 8241cc9..fc227a4 100644 --- a/src/index.js +++ b/src/index.js @@ -676,7 +676,7 @@ class LoginClient { async ensureToken(options) { // When the time is set to zero, don't race the promises, instead just directly check if the token likely exists and return it. Otherwise throw. // * We do this to avoid a scenario where the Promise.race(setTimeout(0)) immediately returns first even if the session is available. - if (options?.timeoutInMillis === 0) { + if (options && options.timeoutInMillis === 0) { const userIdentity = this.getUserIdentity(); const cookies = cookieManager.parse(document.cookie); if (userIdentity) {