Skip to content

Commit 5818c9c

Browse files
committed
chore: Add validation to prevent selecting 'default' server or container in RunCommand.php
1 parent 7b4559c commit 5818c9c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

app/Livewire/RunCommand.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,12 @@ public function updatedSelectedUuid($value)
9090
#[On('connectToContainer')]
9191
public function connectToContainer()
9292
{
93+
if ($this->selected_uuid === 'default') {
94+
$this->dispatch('error', 'Please select a server or a container.');
95+
96+
return;
97+
}
98+
9399
$container = collect($this->containers)->firstWhere('uuid', $this->selected_uuid);
94100

95101
$this->dispatch('send-terminal-command',

0 commit comments

Comments
 (0)