Skip to content

Commit

Permalink
Fix ?. conversion.
Browse files Browse the repository at this point in the history
  • Loading branch information
wparad committed Sep 30, 2024
1 parent 3712280 commit 311c382
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 311c382

Please sign in to comment.