@@ -229,7 +229,7 @@ export class QueryObserver<
229
229
230
230
const result = this . createResult ( query , options )
231
231
232
- if ( shouldAssignObserverCurrentProperties ( this , result , options ) ) {
232
+ if ( shouldAssignObserverCurrentProperties ( this , result ) ) {
233
233
// this assigns the optimistic result to the current Observer
234
234
// because if the query function changes, useQuery will be performing
235
235
// an effect where it would fetch again.
@@ -754,23 +754,7 @@ function shouldAssignObserverCurrentProperties<
754
754
> (
755
755
observer : QueryObserver < TQueryFnData , TError , TData , TQueryData , TQueryKey > ,
756
756
optimisticResult : QueryObserverResult < TData , TError > ,
757
- options : DefaultedQueryObserverOptions <
758
- TQueryFnData ,
759
- TError ,
760
- TData ,
761
- TQueryData ,
762
- TQueryKey
763
- > ,
764
757
) {
765
- // this means we want to put some placeholder data when pending and queryKey
766
- // changed.
767
- if ( options . placeholderData !== undefined ) {
768
- // re-assign properties only if current data is placeholder data
769
- // which means that data did not arrive yet, so, if there is some cached data
770
- // we need to "prepare" to receive it
771
- return optimisticResult . isPlaceholderData
772
- }
773
-
774
758
// if the newly created result isn't what the observer is holding as current,
775
759
// then we'll need to update the properties as well
776
760
if ( observer . getCurrentResult ( ) !== optimisticResult ) {
0 commit comments