From 4b18eff7f2f52f980aae0a75f6dac31dc1f14cf5 Mon Sep 17 00:00:00 2001 From: Matteo Date: Thu, 18 Jan 2024 12:05:03 +0100 Subject: [PATCH] Fix main variable when Multiple Mode is Off --- src/Http/Livewire/Dropzone.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Http/Livewire/Dropzone.php b/src/Http/Livewire/Dropzone.php index 9fcfd56..df41c39 100644 --- a/src/Http/Livewire/Dropzone.php +++ b/src/Http/Livewire/Dropzone.php @@ -93,7 +93,7 @@ public function handleUpload(TemporaryUploadedFile $file): void #[On('{uuid}:fileAdded')] public function onFileAdded(array $file): void { - $this->files[] = $file; + $this->files = $this->multiple ? array_merge($this->files, [$file]) : [$file]; } /**