Skip to content

Commit 9a6b628

Browse files
committed
revert unnecessary change
1 parent 498d0d9 commit 9a6b628

File tree

1 file changed

+6
-6
lines changed
  • redisinsight/ui/src/pages/vector-search/query

1 file changed

+6
-6
lines changed

redisinsight/ui/src/pages/vector-search/query/useQuery.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,11 @@ const useQuery = () => {
9494
)
9595

9696
const handleApiError = useCallback((error: unknown) => {
97-
setItems((prevItems) => {
98-
const message =
99-
error instanceof Error ? error.message : 'Failed to execute command'
97+
const message =
98+
error instanceof Error ? error.message : 'Failed to execute command'
10099

101-
return prevItems.map((item) => {
100+
setItems((prevItems) =>
101+
prevItems.map((item) => {
102102
if (item.loading) {
103103
return {
104104
...item,
@@ -109,8 +109,8 @@ const useQuery = () => {
109109
}
110110
}
111111
return item
112-
})
113-
})
112+
}),
113+
)
114114
setProcessing(false)
115115
}, [])
116116

0 commit comments

Comments
 (0)