diff --git a/src/Livewire/Requests.php b/src/Livewire/Requests.php index 5a05e49..db43330 100644 --- a/src/Livewire/Requests.php +++ b/src/Livewire/Requests.php @@ -18,12 +18,14 @@ public function render() 'count', )); + $requestCollection = $requests['request'] ?? collect(); + if (Livewire::isLivewireRequest()) { - $this->dispatch('requests-chart-update', requests: $requests['request']); + $this->dispatch('requests-chart-update', requests: $requestCollection); } return View::make('requests::livewire.requests', [ - 'requests' => $requests['request'], + 'requests' => $requestCollection, 'time' => $time, 'runAt' => $runAt, 'config' => Config::get('pulse.recorders.'.RequestRecorder::class),