Skip to content

Commit d7a2e33

Browse files
committed
Also check if value is MorphMany when doing shallow augmentation
1 parent 7df450b commit d7a2e33

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Fieldtypes/BaseFieldtype.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ public function shallowAugment($values)
244244
{
245245
$resource = Runway::findResource($this->config('resource'));
246246

247-
if ($values instanceof HasMany || $values instanceof MorphToMany) {
247+
if ($values instanceof HasMany || $values instanceof MorphToMany || $values instanceof MorphMany) {
248248
$results = $values
249249
->get()
250250
->map->toShallowAugmentedArray()

0 commit comments

Comments
 (0)