You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/query-core/src/queryClient.ts
+10-14Lines changed: 10 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -570,13 +570,11 @@ export class QueryClient {
570
570
)
571
571
// It is ok not having defaults, but it is error prone to have more than 1 default for a given key
572
572
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
+
)
580
578
}
581
579
}
582
580
@@ -617,13 +615,11 @@ export class QueryClient {
617
615
)
618
616
// It is ok not having defaults, but it is error prone to have more than 1 default for a given key
619
617
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.`,
0 commit comments