Skip to content

Commit

Permalink
adjustment for compiler compat
Browse files Browse the repository at this point in the history
  • Loading branch information
phryneas committed Jul 12, 2024
1 parent 037ea25 commit 4161379
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .size-limits.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"dist/apollo-client.min.cjs": 40159,
"dist/apollo-client.min.cjs": 40162,
"import { ApolloClient, InMemoryCache, HttpLink } from \"dist/index.js\" (production)": 32999
}
10 changes: 3 additions & 7 deletions src/react/hooks/useQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -370,16 +370,12 @@ function useObservableSubscriptionResult<
skipStandbyResult
: void 0;

const previousData = resultData.previousData;
const currentResultOverride = React.useMemo(
() =>
resultOverride &&
toQueryResult(
resultOverride,
resultData.previousData,
observable,
client
),
[client, observable, resultOverride, resultData.previousData]
toQueryResult(resultOverride, previousData, observable, client),
[client, observable, resultOverride, previousData]
);

return useSyncExternalStore(
Expand Down

0 comments on commit 4161379

Please sign in to comment.