Skip to content

Commit 91e8875

Browse files
committed
add fix in other places
1 parent 97ba9fc commit 91e8875

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/resources/views/crud/fields/relationship/fetch_or_create.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// and format it to JSON, so that select2 can parse it
1313
$current_value = old(square_brackets_to_dots($field['name'])) ?? old($field['name']) ?? $field['value'] ?? $field['default'] ?? '';
1414
15-
if ($current_value !== false && !empty($current_value)) {
15+
if (!empty($current_value) || is_int($current_value)) {
1616
switch (gettype($current_value)) {
1717
case 'array':
1818
$current_value = $connected_entity

src/resources/views/crud/fields/relationship/relationship_select.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
$current_value = old(square_brackets_to_dots($field['name'])) ?? $field['value'] ?? $field['default'] ?? '';
1919
2020
21-
if ($current_value != false) {
21+
if (!empty($current_value) || is_int($current_value)) {
2222
switch (gettype($current_value)) {
2323
case 'array':
2424
$current_value = $connected_entity

0 commit comments

Comments
 (0)