Skip to content

Commit e7ab6b7

Browse files
authored
Merge pull request #4105 from Laravel-Backpack/fix-select2-_from_array
fix 4.1 select2_from_array using 0 as key.
2 parents e49566e + 9b20a32 commit e7ab6b7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/resources/views/crud/fields/select2_from_array.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
@if (count($field['options']))
2222
@foreach ($field['options'] as $key => $value)
23-
@if((old(square_brackets_to_dots($field['name'])) && (
23+
@if((old(square_brackets_to_dots($field['name'])) !== null && (
2424
$key == old(square_brackets_to_dots($field['name'])) ||
2525
(is_array(old(square_brackets_to_dots($field['name']))) &&
2626
in_array($key, old(square_brackets_to_dots($field['name'])))))) ||

0 commit comments

Comments
 (0)