From fd3bf17e04fd8d6ed49432e3236195c6a80ac117 Mon Sep 17 00:00:00 2001 From: Peter Kraume Date: Fri, 26 Apr 2024 12:02:18 +0200 Subject: [PATCH] [BUGFIX] Fix exception with snippet preview when creating a new record Fixes: #574 --- Classes/Form/Element/SnippetPreview.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Classes/Form/Element/SnippetPreview.php b/Classes/Form/Element/SnippetPreview.php index b868aab3..c5f3557c 100644 --- a/Classes/Form/Element/SnippetPreview.php +++ b/Classes/Form/Element/SnippetPreview.php @@ -31,6 +31,10 @@ class SnippetPreview extends AbstractNode public function render(): array { + if ($this->data['command'] === 'new') { + return []; + } + $this->initialize(); $resultArray = $this->initializeResultArray();