Skip to content

Commit

Permalink
Merge pull request #23 from mbardelmeijer/patch-3
Browse files Browse the repository at this point in the history
Fix display callback for usage with morph maps
  • Loading branch information
michielkempen authored May 4, 2020
2 parents a9564d2 + 1025a31 commit bfd6fc9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PolymorphicField.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function __construct($name, $attribute = null)
$this->displayUsing(function ($value) {

foreach ($this->meta['types'] as $type) {
if ($this->mapToKey($type['value']) == $value) {
if ($this->mapToKey($type['value']) == $this->mapToKey($value)) {
return $type['label'];
}
}
Expand Down

0 comments on commit bfd6fc9

Please sign in to comment.