Skip to content

Commit

Permalink
Check for parent. Fixes #3132
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonvarga committed Jan 20, 2021
1 parent 6e42e25 commit 0c85869
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Http/Controllers/CP/Collections/EntriesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public function update(Request $request, $collection, $entry)
$entry->afterSave(function ($entry) use ($parent) {
$tree = $entry->structure()->in($entry->locale());

if (optional($tree->page($parent))->isRoot()) {
if ($parent && optional($tree->page($parent))->isRoot()) {
$parent = null;
}

Expand Down

0 comments on commit 0c85869

Please sign in to comment.