From e2c731f33db4518005003bf028006ca28b7ef316 Mon Sep 17 00:00:00 2001 From: Dominik Riemer Date: Tue, 13 Aug 2024 08:18:44 +0200 Subject: [PATCH] fix: Properly delete elements from pipeline cache in editor (#3133) --- ui/src/app/editor/components/pipeline/pipeline.component.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ui/src/app/editor/components/pipeline/pipeline.component.ts b/ui/src/app/editor/components/pipeline/pipeline.component.ts index 1cfdd1c2e0..71843f0692 100644 --- a/ui/src/app/editor/components/pipeline/pipeline.component.ts +++ b/ui/src/app/editor/components/pipeline/pipeline.component.ts @@ -274,9 +274,10 @@ export class PipelineComponent implements OnInit, OnDestroy { handleDeleteOption(pipelineElement: PipelineElementConfig) { this.JsplumbBridge.removeAllEndpoints(pipelineElement.payload.dom); - this.rawPipelineModel = this.rawPipelineModel.filter( - pe => !(pe.payload.dom === pipelineElement.payload.dom), + const index = this.rawPipelineModel.findIndex( + pe => pe.payload.dom === pipelineElement.payload.dom, ); + this.rawPipelineModel.splice(index, 1); if (this.rawPipelineModel.every(pe => pe.settings.disabled)) { this.editorService.makePipelineAssemblyEmpty(true); }