Skip to content

Commit

Permalink
fix: remove unused wasPrefetched
Browse files Browse the repository at this point in the history
  • Loading branch information
tannerlinsley authored Jun 23, 2020
1 parent 5ce7b1e commit ebbf1a8
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/queryCache.js
Original file line number Diff line number Diff line change
Expand Up @@ -422,15 +422,13 @@ export function makeQueryCache({ frozen = isServer, defaultConfig } = {}) {
// Perform the refetch for this query if necessary
if (
query.config.enabled && // Don't auto refetch if disabled
// !query.wasPrefetched && // Don't double refetch for prefetched queries
!query.wasSuspended && // Don't double refetch for suspense
query.state.isStale && // Only refetch if stale
(query.config.refetchOnMount || query.instances.length === 1)
) {
await query.fetch()
}

query.wasPrefetched = false
query.wasSuspended = false
} catch (error) {
Console.error(error)
Expand Down

0 comments on commit ebbf1a8

Please sign in to comment.