Skip to content

Commit

Permalink
Update lib/useOnyx.ts
Browse files Browse the repository at this point in the history
Co-authored-by: Vit Horacek <[email protected]>
  • Loading branch information
fabioh8010 and mountiny authored Jun 19, 2024
1 parent 5b38b0c commit 24cbaaa
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 @@ -175,7 +175,7 @@ function useOnyx<TKey extends OnyxKey, TReturnValue = OnyxValue<TKey>>(key: TKey
if (isCacheSetFirstTime || !areValuesEqual) {
previousValueRef.current = newValueRef.current;

// If the new value is `null` we default it to `undefined` to ensure the consumer get a consistent result from the hook.
// If the new value is `null` we default it to `undefined` to ensure the consumer gets a consistent result from the hook.
resultRef.current = [previousValueRef.current as CachedValue<TKey, TReturnValue>, {status: newFetchStatus ?? 'loaded'}];
}

Expand Down

0 comments on commit 24cbaaa

Please sign in to comment.