Skip to content

Commit 162d270

Browse files
authored
Fix Plugin extendModel
Fix property `translatable` is not merged when `$translatePlugin->extendModel` is called in multiple times.
1 parent 6d14cf7 commit 162d270

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Plugin.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ public function extendModel($model, string $type, array $translatableAttributes
408408
if (!$model->propertyExists('translatable')) {
409409
$model->addDynamicProperty('translatable', $translatableAttributes);
410410
} else {
411-
$model->translatable = array_merge($model->translatable, $translatableAttributes);
411+
$model->extendableSet('translatable', array_merge($model->translatable, $translatableAttributes));
412412
}
413413

414414
if ($type === 'page') {

0 commit comments

Comments
 (0)