Skip to content

Commit

Permalink
fix null typo
Browse files Browse the repository at this point in the history
  • Loading branch information
kacper-mikolajczak committed Oct 1, 2024
1 parent a16d45f commit 7c65dd0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/useOnyx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ function useOnyx<TKey extends OnyxKey, TReturnValue = OnyxValue<TKey>>(key: TKey
// Stores the previously result returned by the hook, containing the data from cache and the fetch status.
// We initialize it to `undefined` and `loading` fetch status to simulate the initial result when the hook is loading from the cache.
// However, if `initWithStoredValues` is `false` we set the fetch status to `loaded` since we want to signal that data is ready.
const resultRef = useRef<UseOnyxResult<TReturnValue | undefined>>([
const resultRef = useRef<UseOnyxResult<TReturnValue | undefined | null>>([
undefined,
{
status: options?.initWithStoredValues === false ? 'loaded' : 'loading',
Expand Down

0 comments on commit 7c65dd0

Please sign in to comment.