Skip to content

Commit

Permalink
fix(QueriesObserver): include default options on duplicate query, que…
Browse files Browse the repository at this point in the history
…ryHash check (#8432)

Co-authored-by: Dominik Dorfmeister <[email protected]>
  • Loading branch information
nick-avi-say and TkDodo authored Jan 6, 2025
1 parent 3104854 commit e664d22
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/query-core/src/queriesObserver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ export class QueriesObserver<
this.#options = options

if (process.env.NODE_ENV !== 'production') {
const queryHashes = queries.map((query) => query.queryHash)
const queryHashes = queries.map(
(query) => this.#client.defaultQueryOptions(query).queryHash,
)
if (new Set(queryHashes).size !== queryHashes.length) {
console.warn(
'[QueriesObserver]: Duplicate Queries found. This might result in unexpected behavior.',
Expand Down

0 comments on commit e664d22

Please sign in to comment.