Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
shuding committed Nov 24, 2022
1 parent 7ec5ee6 commit 1c9c578
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions core/use-swr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,13 +147,11 @@ export const useSWRHandler = <Data = any, Error = any>(
return snapshot
}

return Object.assign(
{
isValidating: true,
isLoading: true
},
snapshot
)
return {
isValidating: true,
isLoading: true,
...snapshot
}
}

let memorizedSnapshot = getSelectedCache()
Expand Down

0 comments on commit 1c9c578

Please sign in to comment.