You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
0 commit comments