From e56c4859dc541b45dc6477ac073f43e72499b1a6 Mon Sep 17 00:00:00 2001 From: Chrysanthos Date: Fri, 2 Feb 2024 20:06:10 +0200 Subject: [PATCH] Closes #1 --- src/Livewire/Requests.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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),