Skip to content

Commit a3ae6a0

Browse files
ci: apply automated fixes
1 parent 76d10d6 commit a3ae6a0

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

packages/query-core/src/queriesObserver.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ export class QueriesObserver<
236236
queries: Array<QueryObserverOptions>,
237237
): Array<QueryObserverMatch> {
238238
const prevObserversMap = new Map<string, Array<QueryObserver>>()
239-
239+
240240
this.#observers.forEach((observer) => {
241241
const key = observer.options.queryHash
242242
if (!key) return
@@ -249,14 +249,15 @@ export class QueriesObserver<
249249
prevObserversMap.set(key, [observer])
250250
}
251251
})
252-
252+
253253
const observers: Array<QueryObserverMatch> = []
254254

255255
queries.forEach((options) => {
256256
const defaultedOptions = this.#client.defaultQueryOptions(options)
257257
const match = prevObserversMap.get(defaultedOptions.queryHash)?.shift()
258-
const observer = match ?? new QueryObserver(this.#client, defaultedOptions)
259-
258+
const observer =
259+
match ?? new QueryObserver(this.#client, defaultedOptions)
260+
260261
observers.push({
261262
defaultedQueryOptions: defaultedOptions,
262263
observer,

packages/react-query/src/__tests__/useSuspenseQueries.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ describe('useSuspenseQueries', () => {
250250
data: 'John Doe',
251251
data2: 50,
252252
})
253-
253+
254254
// With the infinite loop bug, renderCount would be very high (e.g. > 100)
255255
// Without bug, it should be small (initial suspend + resolution = 2-3)
256256
expect(renderCount).toBeLessThan(10)

0 commit comments

Comments
 (0)