From 50519a86a9f57d2ebf3b70323c480d23a4583ec9 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Fri, 25 Oct 2024 17:38:14 +0200 Subject: [PATCH] fix: numberOfLines could be null --- app/Livewire/Project/Shared/GetLogs.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Livewire/Project/Shared/GetLogs.php b/app/Livewire/Project/Shared/GetLogs.php index 0e140b8c1..f3d9da07d 100644 --- a/app/Livewire/Project/Shared/GetLogs.php +++ b/app/Livewire/Project/Shared/GetLogs.php @@ -39,7 +39,7 @@ class GetLogs extends Component public ?bool $showTimeStamps = true; - public int $numberOfLines = 100; + public ?int $numberOfLines = 100; public function mount() { @@ -98,7 +98,7 @@ class GetLogs extends Component if (! $refresh && ($this->resource?->getMorphClass() === 'App\Models\Service' || str($this->container)->contains('-pr-'))) { return; } - if ($this->numberOfLines <= 0) { + if ($this->numberOfLines <= 0 || is_null($this->numberOfLines)) { $this->numberOfLines = 1000; } if ($this->container) {