File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ ' @tanstack/query-core ' : patch
3+ ---
4+
5+ fix: observing "promise" needs to implicitly observe "data"
Original file line number Diff line number Diff line change @@ -269,16 +269,18 @@ export class QueryObserver<
269269 get : ( target , key ) => {
270270 this . trackProp ( key as keyof QueryObserverResult )
271271 onPropTracked ?.( key as keyof QueryObserverResult )
272- if (
273- key === 'promise' &&
274- ! this . options . experimental_prefetchInRender &&
275- this . #currentThenable. status === 'pending'
276- ) {
277- this . #currentThenable. reject (
278- new Error (
279- 'experimental_prefetchInRender feature flag is not enabled' ,
280- ) ,
281- )
272+ if ( key === 'promise' ) {
273+ this . trackProp ( 'data' )
274+ if (
275+ ! this . options . experimental_prefetchInRender &&
276+ this . #currentThenable. status === 'pending'
277+ ) {
278+ this . #currentThenable. reject (
279+ new Error (
280+ 'experimental_prefetchInRender feature flag is not enabled' ,
281+ ) ,
282+ )
283+ }
282284 }
283285 return Reflect . get ( target , key )
284286 } ,
You can’t perform that action at this time.
0 commit comments