Skip to content

Commit

Permalink
remove unused check
Browse files Browse the repository at this point in the history
  • Loading branch information
chrispader committed Jun 11, 2024
1 parent a0991a9 commit 9c94b0c
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions lib/useOnyx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,6 @@ function useOnyx<TKey extends OnyxKey, TReturnValue = OnyxValue<TKey>>(key: TKey
newFetchStatus = 'loading';
}

// If `options.initWithStoredValues` is explicitly set to `false`, the fetch status should always be `loaded`.
if (options?.initWithStoredValues === false) {
newFetchStatus = 'loaded';
}

// If data is not present in cache and `initialValue` is set during the first connection,
// we set the new value to `initialValue` and fetch status to `loaded` since we already have some data to return to the consumer.
if (isFirstConnectionRef.current && !hasCacheForKey && options?.initialValue !== null && options?.initialValue !== undefined) {
Expand Down

0 comments on commit 9c94b0c

Please sign in to comment.