File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
packages/query-devtools/src Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -1789,15 +1789,20 @@ const QueryDetails = () => {
17891789 const restoreQueryAfterLoadingOrError = ( ) => {
17901790 const activeQueryVal = activeQuery ( ) !
17911791 const previousState = activeQueryVal . state
1792- const previousOptions = ( activeQueryVal . state . fetchMeta as any )
1793- . __previousQueryOptions
1792+ const previousOptions = activeQueryVal . state . fetchMeta
1793+ ? ( activeQueryVal . state . fetchMeta as any ) . __previousQueryOptions
1794+ : null
1795+
17941796 activeQueryVal . cancel ( { silent : true } )
17951797 activeQueryVal . setState ( {
17961798 ...previousState ,
17971799 fetchStatus : 'idle' ,
17981800 fetchMeta : null ,
17991801 } )
1800- activeQueryVal . fetch ( previousOptions )
1802+
1803+ if ( previousOptions ) {
1804+ activeQueryVal . fetch ( previousOptions )
1805+ }
18011806 }
18021807
18031808 createEffect ( ( ) => {
You can’t perform that action at this time.
0 commit comments