diff --git a/lib/useOnyx.ts b/lib/useOnyx.ts index 13561a7c..5de00bfc 100644 --- a/lib/useOnyx.ts +++ b/lib/useOnyx.ts @@ -111,7 +111,7 @@ function useOnyx>(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>([ + const resultRef = useRef>([ undefined, { status: options?.initWithStoredValues === false ? 'loaded' : 'loading',