Skip to content

Commit

Permalink
Return unlink when parent is not set
Browse files Browse the repository at this point in the history
  • Loading branch information
BobWez98 authored Sep 16, 2024
1 parent 1cdc749 commit 8c7e4f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Fieldtypes/BaseFieldtype.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public function preload()

private function getUnlinkBehavior(): string
{
if ($this instanceof BelongsToFieldtype) {
if ($this instanceof BelongsToFieldtype || !$this->field->parent()) {
return 'unlink';
}

Expand Down

0 comments on commit 8c7e4f2

Please sign in to comment.