Skip to content
Snippets Groups Projects
Commit 10c45355 authored by Reiter, Christoph's avatar Reiter, Christoph :snake:
Browse files

Don't use splice to remove an item from the queue

It will move all following keys one back
parent 531fd229
No related branches found
No related tags found
No related merge requests found
...@@ -264,8 +264,8 @@ export class FileUpload extends ScopedElementsMixin(VPULitElement) { ...@@ -264,8 +264,8 @@ export class FileUpload extends ScopedElementsMixin(VPULitElement) {
* @param key * @param key
*/ */
takeFileFromQueue(key) { takeFileFromQueue(key) {
// splice the data of the key off the queue const file = this.queuedFiles[key];
const file = this.queuedFiles.splice(key, 1)[0]; delete this.queuedFiles[key];
this.updateQueuedFilesCount(); this.updateQueuedFilesCount();
return file; return file;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment