Skip to content

Commit bb64328

Browse files
committed
fix: DRY
1 parent a573f40 commit bb64328

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/containers/Tenant/Query/QueryEditor/QueryEditor.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,9 @@ export default function QueryEditor(props: QueryEditorProps) {
143143
setLastQueryExecutionSettings(querySettings);
144144
}
145145
const queryId = uuidv4();
146+
queryManagerInstance.abortQuery();
146147

147148
if (isStreamingEnabled) {
148-
queryManagerInstance.abortQuery();
149-
150149
const query = streamQuery({
151150
actionType: 'execute',
152151
query: text,
@@ -157,8 +156,6 @@ export default function QueryEditor(props: QueryEditorProps) {
157156

158157
queryManagerInstance.registerQuery(query);
159158
} else {
160-
queryManagerInstance.abortQuery();
161-
162159
const query = sendQuery({
163160
actionType: 'execute',
164161
query: text,

0 commit comments

Comments
 (0)