Skip to content

Commit

Permalink
Merge pull request #5751 from Laravel-Backpack/fix-switch-default-color
Browse files Browse the repository at this point in the history
fix switch when no color is given
  • Loading branch information
pxpm authored Jan 22, 2025
2 parents b5fdbd3 + 949bc55 commit 892464a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/resources/views/crud/fields/switch.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
$field['value'] = old_empty_or_null($field['name'], '') ?? $field['value'] ?? $field['default'] ?? '0';
$field['onLabel'] = $field['onLabel'] ?? '';
$field['offLabel'] = $field['offLabel'] ?? '';
$field['color'] = $field['color'] ?? 'var(--bg-switch-checked-color)';
$field['color'] = $field['color'] ?? 'var(--bg-switch-checked-color, black)';
@endphp

{{-- Wrapper --}}
Expand Down

0 comments on commit 892464a

Please # to comment.