From 10c4535539e66c7b562c67773f85d6f85c3b3152 Mon Sep 17 00:00:00 2001 From: Christoph Reiter <reiter.christoph@gmail.com> Date: Tue, 2 Jun 2020 11:30:54 +0200 Subject: [PATCH] Don't use splice to remove an item from the queue It will move all following keys one back --- packages/file-handling/src/fileupload.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/file-handling/src/fileupload.js b/packages/file-handling/src/fileupload.js index 14e72174..5349f93a 100644 --- a/packages/file-handling/src/fileupload.js +++ b/packages/file-handling/src/fileupload.js @@ -264,8 +264,8 @@ export class FileUpload extends ScopedElementsMixin(VPULitElement) { * @param key */ takeFileFromQueue(key) { - // splice the data of the key off the queue - const file = this.queuedFiles.splice(key, 1)[0]; + const file = this.queuedFiles[key]; + delete this.queuedFiles[key]; this.updateQueuedFilesCount(); return file; -- GitLab