fix(query-core): update initialData when an observer mounts while a Query without data exists (#9620)
initialData gives the guarantee that data cannot be undefined, but this falls short when you create a Query via prefetching, and then mount the observer that has initialData set. That's because initialData is only doing something in the constructor of the Query, so if the Observer isn't the one who creates the Query, it does nothing This fix makes sure that when new options are applied on a Query (which e.g. happens when an observer mounts), initialData is taken into account when the Query doesn't have any data yet
D
Dominik Dorfmeister committed
1c8a92167769f322d0206325b98493769afb0961
Parent: b43af57
Committed by GitHub <noreply@github.com>
on 9/5/2025, 2:13:31 PM