Skip to content

Commit 1846404

Browse files
committed
fix: ts 4.7 error
1 parent 85ee7bb commit 1846404

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/query-core/src/queryObserver.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -505,9 +505,9 @@ export class QueryObserver<
505505
} else {
506506
placeholderData =
507507
typeof options.placeholderData === 'function'
508-
? (options.placeholderData as PlaceholderDataFunction<TQueryData>)(
509-
prevQueryResult?.data as TQueryData | undefined,
510-
)
508+
? (
509+
options.placeholderData as unknown as PlaceholderDataFunction<TQueryData>
510+
)(prevQueryResult?.data as TQueryData | undefined)
511511
: options.placeholderData
512512
if (options.select && typeof placeholderData !== 'undefined') {
513513
try {

0 commit comments

Comments
 (0)