[Create Server] Fix 500 when changing egg

When changing from one egg to nothing, a 500 is displayed due to it expecting startup to have a value
This commit is contained in:
Charles 2024-06-17 12:24:52 -04:00
parent 6692942f6f
commit c431775b7e

View File

@ -300,7 +300,7 @@ class CreateServer extends CreateRecord
->live()
->afterStateUpdated(function ($state, Forms\Set $set, Forms\Get $get, $old) {
$egg = Egg::query()->find($state);
$set('startup', $egg->startup);
$set('startup', $egg->startup ?? '');
$set('image', '');
$variables = $egg->variables ?? [];