mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 17:44:04 +00:00
Add empty array default
This commit is contained in:
parent
9ff77d2128
commit
aca5567c10
1 changed files with 1 additions and 1 deletions
|
|
@ -79,7 +79,7 @@ trait TenantManagerEvents
|
||||||
public function event(string $name): Collection
|
public function event(string $name): Collection
|
||||||
{
|
{
|
||||||
return array_reduce($this->listeners[$name], function ($prevents, $listener) {
|
return array_reduce($this->listeners[$name], function ($prevents, $listener) {
|
||||||
return $prevents->merge($listener($this));
|
return $prevents->merge($listener($this) ?? []);
|
||||||
}, collect([]));
|
}, collect([]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue