File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -195,7 +195,7 @@ export const useSWRHandler = <Data = any, Error = any>(
195
195
196
196
return {
197
197
isValidating : true ,
198
- isLoading : isUndefined ( fallback ) ,
198
+ isLoading : true ,
199
199
...snapshot
200
200
}
201
201
}
@@ -278,8 +278,8 @@ export const useSWRHandler = <Data = any, Error = any>(
278
278
279
279
const returnedData = keepPreviousData
280
280
? isUndefined ( cachedData )
281
- ? // checking undefined to avoid null being fallback as well
282
- isUndefined ( laggyDataRef . current )
281
+ // checking undefined to avoid null being fallback as well
282
+ ? isUndefined ( laggyDataRef . current )
283
283
? data
284
284
: laggyDataRef . current
285
285
: cachedData
@@ -390,7 +390,7 @@ export const useSWRHandler = <Data = any, Error = any>(
390
390
const initialState : State < Data , Error > = { isValidating : true }
391
391
// It is in the `isLoading` state, if and only if there is no cached data.
392
392
// This bypasses fallback data and laggy data.
393
- if ( isUndefined ( getCache ( ) . data ) && isUndefined ( fallback ) ) {
393
+ if ( isUndefined ( getCache ( ) . data ) ) {
394
394
initialState . isLoading = true
395
395
}
396
396
try {
You can’t perform that action at this time.
0 commit comments