Skip to content

Commit c9f0255

Browse files
committed
There's no parent if the entry being localized is the root. (e.g. a home page)
1 parent a8f3f47 commit c9f0255

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Http/Controllers/CP/Collections/LocalizeEntryController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ private function addToStructure($collection, $entry, $localized)
3737
}
3838

3939
$tree = $structure->in($localized->locale());
40-
$parent = $entry->parent()->in($localized->locale());
40+
$parent = optional($entry->parent())->in($localized->locale());
4141

4242
$localized->afterSave(function ($localized) use ($parent, $tree) {
4343
if (! $parent || $parent->isRoot()) {

0 commit comments

Comments
 (0)