Skip to content

Commit

Permalink
FIX Use canDelete, not the now-deleted canArchive (#1232)
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli authored Aug 15, 2024
1 parent 7e542b9 commit cec5c45
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/Models/BaseElement.php
Original file line number Diff line number Diff line change
Expand Up @@ -276,11 +276,7 @@ public function canDelete($member = null)

if ($this->hasMethod('getPage')) {
if ($page = $this->getPage()) {
if ($page->hasExtension(Versioned::class)) {
return Deprecation::withNoReplacement(fn() => $page->canArchive($member));
} else {
return $page->canDelete($member);
}
return $page->canDelete($member);
}
}

Expand Down

0 comments on commit cec5c45

Please sign in to comment.