From 5d9d5451a5d1da687b65c597669e938dca94b08d Mon Sep 17 00:00:00 2001 From: dcore94 Date: Tue, 31 Jan 2023 18:09:57 +0100 Subject: [PATCH] fixed bug for delete --- ccp/js/executionhistorycontroller.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ccp/js/executionhistorycontroller.js b/ccp/js/executionhistorycontroller.js index da6d42b..b3bc15f 100644 --- a/ccp/js/executionhistorycontroller.js +++ b/ccp/js/executionhistorycontroller.js @@ -189,12 +189,12 @@ class CCPExecutionHistory extends HTMLElement { on_click: ev=>{ if(ev.target.getAttribute("name") === "delete"){ if(window.confirm("Confirm deletion of this execution?")){ - const index = Number(ev.target.getAttribute("data-index")) + const index = Number(ev.currentTarget.getAttribute("data-index")) this.deleteExecution(this.#executions[index].id) } } if(ev.target.getAttribute("name") === "zip"){ - const index = Number(ev.target.getAttribute("data-index")) + const index = Number(ev.currentTarget.getAttribute("data-index")) this.downloadZIP(this.#executions[index].id) } },