From cb7dd2ebb871d0be8f1a11a8cd8ce592cd74b7c7 Mon Sep 17 00:00:00 2001 From: Tom Meagher Date: Wed, 6 Nov 2024 13:22:32 -0500 Subject: [PATCH] fix: #4310 --- .changeset/smart-cobras-do.md | 5 +++++ packages/core/src/query/utils.ts | 4 +--- 2 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 .changeset/smart-cobras-do.md diff --git a/.changeset/smart-cobras-do.md b/.changeset/smart-cobras-do.md new file mode 100644 index 0000000000..a02ff85a92 --- /dev/null +++ b/.changeset/smart-cobras-do.md @@ -0,0 +1,5 @@ +--- +"@wagmi/core": patch +--- + +Removed unnecessary internal deep equal check in `structuralSharing`. diff --git a/packages/core/src/query/utils.ts b/packages/core/src/query/utils.ts index 968b932494..ab4ea3b989 100644 --- a/packages/core/src/query/utils.ts +++ b/packages/core/src/query/utils.ts @@ -1,11 +1,9 @@ import { type QueryKey, replaceEqualDeep } from '@tanstack/query-core' -import { deepEqual } from '../utils/deepEqual.js' export function structuralSharing( oldData: data | undefined, newData: data, ): data { - if (deepEqual(oldData, newData)) return oldData as data return replaceEqualDeep(oldData, newData) } @@ -60,7 +58,7 @@ export function filterQueryOptions>( // import('@tanstack/query-core').InfiniteQueryObserverOptions getPreviousPageParam, getNextPageParam, initialPageParam, - + // import('@tanstack/react-query').UseQueryOptions _optimisticResults, enabled, notifyOnChangeProps, placeholderData, refetchInterval, refetchIntervalInBackground, refetchOnMount, refetchOnReconnect, refetchOnWindowFocus, retryOnMount, select, staleTime, suspense, throwOnError,