Skip to content

Commit

Permalink
[BUGFIX] Fix exception with snippet preview when creating a new record
Browse files Browse the repository at this point in the history
Fixes: Yoast#574
  • Loading branch information
peterkraume committed Apr 26, 2024
1 parent c1e4ae9 commit fd3bf17
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Classes/Form/Element/SnippetPreview.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ class SnippetPreview extends AbstractNode

public function render(): array
{
if ($this->data['command'] === 'new') {
return [];
}

$this->initialize();

$resultArray = $this->initializeResultArray();
Expand Down

0 comments on commit fd3bf17

Please sign in to comment.