Skip to content

Commit

Permalink
Merge pull request #4 from SWEET1S/master
Browse files Browse the repository at this point in the history
fix(methods): Fix method save for removable()
  • Loading branch information
alexvenga authored Jul 17, 2023
2 parents 17960eb + 8bcc8f0 commit c042c74
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Fields/Translatable.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,13 @@ public function save(Model $item): Model
);
}

if ($this->isRemovable()) {
$item->replaceTranslations($this->field(), $array);
return $item;
}

$item->setTranslations($this->field(), $array);
return $item;

}

Expand Down

0 comments on commit c042c74

Please sign in to comment.