From b05ad2f1d75feea566e8f21b675f2f00165c9360 Mon Sep 17 00:00:00 2001 From: Javier Godoy <11554739+javier-godoy@users.noreply.github.com> Date: Tue, 26 Nov 2024 14:12:35 -0300 Subject: [PATCH] fix: avoid assigning File.name Close #2 --- .../com/flowingcode/vaadin/addons/uploadhelper/FileInfo.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/com/flowingcode/vaadin/addons/uploadhelper/FileInfo.java b/src/main/java/com/flowingcode/vaadin/addons/uploadhelper/FileInfo.java index 4557e91..c7ee1c2 100644 --- a/src/main/java/com/flowingcode/vaadin/addons/uploadhelper/FileInfo.java +++ b/src/main/java/com/flowingcode/vaadin/addons/uploadhelper/FileInfo.java @@ -82,6 +82,7 @@ private void update(boolean createIfNotExists) { if ($1) d.files = [... d.files, $0]; else return; } else { if (d.files.some((e,j)=>e.name==$0.name && j>i)) d.files=d.files.filter((e,j)=>e.name!=$0.name || j<=i); + delete $0.name; d.files[i] = Object.assign(d.files[i], $0); } d.files = Array.from(d.files);