From a6b3beafbba80cb62cc2c05a2f19d9f267132235 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Tue, 5 Mar 2024 09:20:50 +0100 Subject: [PATCH] Fix issue with loading repositories in GithubPrivateRepository.php --- app/Livewire/Project/New/GithubPrivateRepository.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Livewire/Project/New/GithubPrivateRepository.php b/app/Livewire/Project/New/GithubPrivateRepository.php index 012325ff1..39bead900 100644 --- a/app/Livewire/Project/New/GithubPrivateRepository.php +++ b/app/Livewire/Project/New/GithubPrivateRepository.php @@ -79,7 +79,9 @@ public function loadRepositories($github_app_id) $this->loadRepositoryByPage(); } } - $this->selected_repository_id = $this->repositories[0]['id']; + if ($this->repositories->count() > 0) { + $this->selected_repository_id = $this->repositories[0]['id']; + } $this->current_step = 'repository'; }