Skip to content

Commit

Permalink
Reuse VersionId::default
Browse files Browse the repository at this point in the history
  • Loading branch information
bastianallgeier committed May 17, 2024
1 parent 62fe413 commit 4ff106e
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/Content/ContentTranslation.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,8 @@ public function content(): array
*/
public function contentFile(): string
{
// temporary compatibility change (TODO: take this from the parent `ModelVersion` object)
$versionId = $this->parent::CLASS_ALIAS === 'page' && $this->parent->isDraft() === true ?
VersionId::changes() :
VersionId::published();

return $this->contentFile = $this->parent->storage()->contentFile(
$versionId,
VersionId::default($this->parent),
$this->code,
true
);
Expand Down

0 comments on commit 4ff106e

Please sign in to comment.