Skip to content

Commit

Permalink
if there's not entry, don't show (#6)
Browse files Browse the repository at this point in the history
temp to remove crash
  • Loading branch information
edalzell committed Jun 25, 2021
1 parent 485114a commit 61e355f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Fieldtypes/Review.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ public function defaultValue()
public function preload()
{
/** @var \Statamic\Entries\Entry */
$entry = $this->field->parent();
if (! $entry = $this->field->parent()) {
return [];
}

// when it's a new entry the "parent" is the collection
// in this case, we can't show it anyway so return empty
Expand Down

0 comments on commit 61e355f

Please sign in to comment.