diff --git a/app/Livewire/Project/Application/Deployment/Show.php b/app/Livewire/Project/Application/Deployment/Show.php index 6d50fb3c7..44ab419c2 100644 --- a/app/Livewire/Project/Application/Deployment/Show.php +++ b/app/Livewire/Project/Application/Deployment/Show.php @@ -20,6 +20,8 @@ class Show extends Component public bool $is_debug_enabled = false; + private bool $deploymentFinishedDispatched = false; + public function getListeners() { return [ @@ -92,8 +94,9 @@ public function polling() $this->horizon_job_status = $this->application_deployment_queue->getHorizonJobStatus(); $this->isKeepAliveOn(); - // Dispatch event when deployment finishes to stop auto-scroll - if (! $this->isKeepAliveOn) { + // Dispatch event when deployment finishes to stop auto-scroll (only once) + if (! $this->isKeepAliveOn && ! $this->deploymentFinishedDispatched) { + $this->deploymentFinishedDispatched = true; $this->dispatch('deploymentFinished'); } }