Skip to content

Commit 7975274

Browse files
committed
Translatable record bugfix
1 parent 181796c commit 7975274

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Concern/HasTranslatableRecords.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,10 @@ private function updateModelTranslation(?Model $record = null): void
4545
foreach ($record->getRelations() as $relationKey => $item) {
4646
if (is_array($item) || $item instanceof Arrayable) {
4747
foreach ($item as $relationRecord) {
48-
$this->updateModelTranslation($relationRecord);
48+
if ($relationRecord instanceof Model) {
49+
50+
$this->updateModelTranslation($relationRecord);
51+
}
4952
}
5053

5154
} else if (! empty($item)) {

0 commit comments

Comments
 (0)