A free open source IT asset/license management system
Simplify logic
Marcus Moore68749e7e878f
diff --git a/app/Livewire/CustomFieldSetDefaultValuesForModel.php b/app/Livewire/CustomFieldSetDefaultValuesForModel.phpindex 7889c2a691..796d368481 100644--- a/app/Livewire/CustomFieldSetDefaultValuesForModel.php+++ b/app/Livewire/CustomFieldSetDefaultValuesForModel.php@@ -68,9 +68,9 @@ class CustomFieldSetDefaultValuesForModel extends Component// a comma-separated string but if we're loading the page// with old input then it was already parsed into an array.if ($field->element === 'checkbox' && is_string($defaultValue)) {- $this->selectedValues[$field->db_column] = explode(', ', $defaultValue);- } else {- $this->selectedValues[$field->db_column] = $defaultValue;+ $defaultValue = explode(', ', $defaultValue);}++ $this->selectedValues[$field->db_column] = $defaultValue;}}