Skip to content

Commit 438c460

Browse files
authored
[chore] Improve request cancelation handling in vis embeddable (#65057) (#65637)
1 parent c4ab557 commit 438c460

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/plugins/visualizations/public/embeddable/visualize_embeddable.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,13 +340,14 @@ export class VisualizeEmbeddable extends Embeddable<VisualizeInput, VisualizeOut
340340
this.abortController.abort();
341341
}
342342
this.abortController = new AbortController();
343+
const abortController = this.abortController;
343344
this.expression = await buildPipeline(this.vis, {
344345
timefilter: this.timefilter,
345346
timeRange: this.timeRange,
346347
abortSignal: this.abortController!.signal,
347348
});
348349

349-
if (this.handler) {
350+
if (this.handler && !abortController.signal.aborted) {
350351
this.handler.update(this.expression, expressionParams);
351352
}
352353
}

0 commit comments

Comments
 (0)