File tree 1 file changed +8
-3
lines changed
packages/query-devtools/src
1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -1789,15 +1789,20 @@ const QueryDetails = () => {
1789
1789
const restoreQueryAfterLoadingOrError = ( ) => {
1790
1790
const activeQueryVal = activeQuery ( ) !
1791
1791
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
+
1794
1796
activeQueryVal . cancel ( { silent : true } )
1795
1797
activeQueryVal . setState ( {
1796
1798
...previousState ,
1797
1799
fetchStatus : 'idle' ,
1798
1800
fetchMeta : null ,
1799
1801
} )
1800
- activeQueryVal . fetch ( previousOptions )
1802
+
1803
+ if ( previousOptions ) {
1804
+ activeQueryVal . fetch ( previousOptions )
1805
+ }
1801
1806
}
1802
1807
1803
1808
createEffect ( ( ) => {
You can’t perform that action at this time.
0 commit comments