Skip to content

Commit

Permalink
removes unused error code
Browse files Browse the repository at this point in the history
  • Loading branch information
smacpherson64 committed Apr 22, 2024
1 parent 4f2e8aa commit e5a9962
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions packages/toolkit/src/query/react/buildHooks.ts
Expand Up @@ -687,12 +687,6 @@ export function buildHooks<Definitions extends EndpointDefinitions>({

const hasData = data !== undefined

// error is the last known error we have tracked - or if none has been tracked yet the last errored result for the current args
let error = currentState.isError ? currentState.error : lastResult?.error
if (error === undefined) error = currentState.error

const hasError = error !== undefined

// isFetching = true any time a request is in flight
const isFetching = currentState.isLoading
// isLoading = true only when loading while no data is present yet (initial load with no data in the cache)
Expand Down

0 comments on commit e5a9962

Please sign in to comment.