Skip to content

Commit

Permalink
fix: Assign an initial value to the $file property. (#16)
Browse files Browse the repository at this point in the history
* added initial value to variable called files

* fix: mount variable called files

---------

Co-authored-by: macerd <[email protected]>
  • Loading branch information
macerd and macerd authored Feb 27, 2024
1 parent 4652e47 commit 0e4308b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Http/Livewire/Dropzone.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class Dropzone extends Component
use WithFileUploads;

#[Modelable]
public array $files;
public ?array $files;

#[Locked]
public array $rules;
Expand Down Expand Up @@ -46,6 +46,7 @@ public function mount(array $rules = [], bool $multiple = false): void
$this->uuid = Str::uuid();
$this->multiple = $multiple;
$this->rules = $rules;
$this->files = [];
}

public function updatedUpload(): void
Expand Down

0 comments on commit 0e4308b

Please sign in to comment.