Allow preview for unsaved forms

[MAILPOET-3662]
This commit is contained in:
Jan Lysý
2021-09-22 17:26:10 +02:00
committed by Veljko V
parent 196b0cfd93
commit 857268c5ff
2 changed files with 3 additions and 5 deletions

View File

@@ -42,7 +42,7 @@ class FormPreview {
}
public function renderContent(): string {
if (!isset($this->data['id']) || !isset($this->data['form_type'])) {
if (!array_key_exists('id', $this->data ?? []) || !isset($this->data['form_type'])) {
return '';
}
return $this->formPreviewPage->renderPage(