query.data with initial value returns undefined
Hello, did not know where to post it exactly, as it seems like bug, however it is not reproducable so gonna ask here:
We have a query like this:
It is wrapped around a function (hook) that is called directly in
Very rarely (which unfortunately makes it unreproducible) we get a following error:
Uncaught TypeError: Cannot read properties of undefined (reading 'isEnabled') TypeError: Cannot read properties of undefined (reading 'isEnabled')
My question is, is it even possible for data to be undifined if initial data is provided? Shouldn't that be default value if query is not fetched yet?
React-query version: v4.29.19
Typescript version: v4.8.4
Would be very grateful for response
We have a query like this:
It is wrapped around a function (hook) that is called directly in
App.tsx, which means is called very oftenVery rarely (which unfortunately makes it unreproducible) we get a following error:
Uncaught TypeError: Cannot read properties of undefined (reading 'isEnabled') TypeError: Cannot read properties of undefined (reading 'isEnabled')
My question is, is it even possible for data to be undifined if initial data is provided? Shouldn't that be default value if query is not fetched yet?
React-query version: v4.29.19
Typescript version: v4.8.4
Would be very grateful for response