diff --git a/src/Traits/Events.php b/src/Traits/Events.php index 879e5c5..a56762a 100644 --- a/src/Traits/Events.php +++ b/src/Traits/Events.php @@ -136,6 +136,10 @@ protected function trigger(string $event, mixed ...$args): void { $event = Format::kebabCase($event); + if (empty($this->events[$event] ?? [])) { + return; + } + ksort($this->events[$event], SORT_NUMERIC); foreach ($this->events[$event] as $handler) {