Skip to content

Commit dd4a41c

Browse files
nkdengineercead22
andauthored
Update lib/useOnyx.ts
Co-authored-by: Carlos Alvarez <[email protected]>
1 parent cbcb573 commit dd4a41c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/useOnyx.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ function useOnyx<TKey extends OnyxKey, TReturnValue = OnyxValue<TKey>>(
264264
return result;
265265
}
266266

267-
// We get the value from cache while the first connection to Onyx is being made or the key has changed,
267+
// We get the value from cache while the first connection to Onyx is being made or if the key has changed,
268268
// so we can return any cached value right away. After the connection is made, we only
269269
// update `newValueRef` when `Onyx.connect()` callback is fired.
270270
if (isFirstConnectionRef.current || shouldGetCachedValueRef.current || key !== previousKey) {

0 commit comments

Comments
 (0)