Skip to content

Commit 423bcf0

Browse files
authored
refactor(query-core): remove queryKey check in production environment (#5969)
1 parent 29c9b18 commit 423bcf0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/query-core/src/query.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -354,8 +354,8 @@ export class Query<
354354
}
355355
}
356356

357-
if (!Array.isArray(this.options.queryKey)) {
358-
if (process.env.NODE_ENV !== 'production') {
357+
if (process.env.NODE_ENV !== 'production') {
358+
if (!Array.isArray(this.options.queryKey)) {
359359
this.logger.error(
360360
`As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']`,
361361
)

0 commit comments

Comments
 (0)