Skip to content
This repository has been archived by the owner on Apr 27, 2021. It is now read-only.

Commit

Permalink
Fix for plural keys when select2 returns array with null or string value
Browse files Browse the repository at this point in the history
  • Loading branch information
czim committed Apr 2, 2020
1 parent e9afa93 commit 0f853e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Strategies/Form/Store/RelationPluralKeys.php
Expand Up @@ -89,7 +89,7 @@ public function performStoreAfter(Model $model, $source, $value)
throw new UnexpectedValueException("{$source} is a single relation, expecting plural");
}

if (null === $value) {
if (null === $value || $value === [null] || $value === ['']) {
$value = [];
}

Expand Down

0 comments on commit 0f853e6

Please sign in to comment.