Skip to content

Commit 83366c4

Browse files
authored
feat(query-devtools) set data to undefined on Trigger Error in TanstackQueryDevtools (#10072)
* Set query data to undefined when an error is triggered * changeset
1 parent ed5e5fc commit 83366c4

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

.changeset/many-toes-speak.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@tanstack/query-devtools': minor
3+
---
4+
5+
Set data to undefined on Trigger Error

packages/query-devtools/src/Devtools.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1956,6 +1956,7 @@ const QueryDetails = () => {
19561956
const __previousQueryOptions = activeQueryVal.options
19571957

19581958
activeQueryVal.setState({
1959+
data: undefined,
19591960
status: 'error',
19601961
error,
19611962
fetchMeta: {

0 commit comments

Comments
 (0)