Skip to content

Commit 454c584

Browse files
authored
Already checked in line 566. (#3915)
* Already checked in line 566. (╯°□°)╯︵ ┻━┻ * Well done spotting this @TkDodo
1 parent eaf322b commit 454c584

File tree

1 file changed

+10
-14
lines changed

1 file changed

+10
-14
lines changed

packages/query-core/src/queryClient.ts

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -570,13 +570,11 @@ export class QueryClient {
570570
)
571571
// It is ok not having defaults, but it is error prone to have more than 1 default for a given key
572572
if (matchingDefaults.length > 1) {
573-
if (process.env.NODE_ENV !== 'production') {
574-
this.logger.error(
575-
`[QueryClient] Several query defaults match with key '${JSON.stringify(
576-
queryKey,
577-
)}'. The first matching query defaults are used. Please check how query defaults are registered. Order does matter here. cf. https://react-query.tanstack.com/reference/QueryClient#queryclientsetquerydefaults.`,
578-
)
579-
}
573+
this.logger.error(
574+
`[QueryClient] Several query defaults match with key '${JSON.stringify(
575+
queryKey,
576+
)}'. The first matching query defaults are used. Please check how query defaults are registered. Order does matter here. cf. https://react-query.tanstack.com/reference/QueryClient#queryclientsetquerydefaults.`,
577+
)
580578
}
581579
}
582580

@@ -617,13 +615,11 @@ export class QueryClient {
617615
)
618616
// It is ok not having defaults, but it is error prone to have more than 1 default for a given key
619617
if (matchingDefaults.length > 1) {
620-
if (process.env.NODE_ENV !== 'production') {
621-
this.logger.error(
622-
`[QueryClient] Several mutation defaults match with key '${JSON.stringify(
623-
mutationKey,
624-
)}'. The first matching mutation defaults are used. Please check how mutation defaults are registered. Order does matter here. cf. https://react-query.tanstack.com/reference/QueryClient#queryclientsetmutationdefaults.`,
625-
)
626-
}
618+
this.logger.error(
619+
`[QueryClient] Several mutation defaults match with key '${JSON.stringify(
620+
mutationKey,
621+
)}'. The first matching mutation defaults are used. Please check how mutation defaults are registered. Order does matter here. cf. https://react-query.tanstack.com/reference/QueryClient#queryclientsetmutationdefaults.`,
622+
)
627623
}
628624
}
629625

0 commit comments

Comments
 (0)