Skip to content

Commit

Permalink
fix: initial network load
Browse files Browse the repository at this point in the history
  • Loading branch information
chrispader committed Jun 5, 2024
1 parent 3bfae91 commit 923133c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/libs/Network/NetworkStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import CONST from '@src/CONST';
import ONYXKEYS from '@src/ONYXKEYS';
import type Credentials from '@src/types/onyx/Credentials';

let credentials: Credentials | null = null;
let authToken: string | null = null;
let credentials: Credentials | null | undefined;
let authToken: string | null | undefined;
let authTokenType: ValueOf<typeof CONST.AUTH_TOKEN_TYPES> | null;
let currentUserEmail: string | null = null;
let offline = false;
Expand Down Expand Up @@ -86,15 +86,15 @@ Onyx.connect({
});

function getCredentials(): Credentials | null {
return credentials;
return credentials ?? null;
}

function isOffline(): boolean {
return offline;
}

function getAuthToken(): string | null {
return authToken;
return authToken ?? null;
}

function isSupportRequest(command: string): boolean {
Expand Down

0 comments on commit 923133c

Please sign in to comment.