Skip to content

Commit e5a9962

Browse files
committed
removes unused error code
1 parent 4f2e8aa commit e5a9962

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

packages/toolkit/src/query/react/buildHooks.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -687,12 +687,6 @@ export function buildHooks<Definitions extends EndpointDefinitions>({
687687

688688
const hasData = data !== undefined
689689

690-
// error is the last known error we have tracked - or if none has been tracked yet the last errored result for the current args
691-
let error = currentState.isError ? currentState.error : lastResult?.error
692-
if (error === undefined) error = currentState.error
693-
694-
const hasError = error !== undefined
695-
696690
// isFetching = true any time a request is in flight
697691
const isFetching = currentState.isLoading
698692
// isLoading = true only when loading while no data is present yet (initial load with no data in the cache)

0 commit comments

Comments
 (0)