Skip to content

Commit 10a8b8e

Browse files
committed
minor fix
1 parent 93db4a9 commit 10a8b8e

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/stores/QueryStore.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import Dispatcher, { Action } from '@/stores/Dispatcher'
55
import {
66
AddPoint,
77
ClearPoints,
8+
ClearRoute,
89
ErrorAction,
910
InfoReceived,
1011
InvalidatePoint,
@@ -104,7 +105,12 @@ export default class QueryStore extends Store<QueryStoreState> {
104105
}
105106

106107
reduce(state: QueryStoreState, action: Action): QueryStoreState {
107-
if (action instanceof InvalidatePoint) {
108+
if (action instanceof ClearRoute) {
109+
return {
110+
...state,
111+
currentRequest: { subRequests: [] },
112+
}
113+
} else if (action instanceof InvalidatePoint) {
108114
const points = QueryStore.replacePoint(state.queryPoints, {
109115
...action.point,
110116
isInitialized: false,

0 commit comments

Comments
 (0)