You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When page index (first parameter of useSWRInfinite) is null and setSize method is called, data instead of being undefined (as expected) becomes an object as below:
Bug report
Description / Observed Behavior
When page index (first parameter of
useSWRInfinite
) isnull
and setSize method is called, data instead of beingundefined
(as expected) becomes an object as below:Expected Behavior
It should output
undefined
as data.Repro Steps / Code Example
use the swr-infinite CodeSandbox from the docs and change version to
0.5.6
.or use this CodeSandbox.
Additional Context
this was ok in version
0.3.0
as I tested in swr-infinite CodeSandbox, but it's not now in0.5.6
.I hadn't investigated the problem, but I think there might be an issue with this line:
swr/infinite/index.ts
Line 110 in c677d04
I guess it should be like this?:
The text was updated successfully, but these errors were encountered: