Skip to content

Commit

Permalink
Merge pull request #362 from DanielvdSpoel/3.x
Browse files Browse the repository at this point in the history
Add if statement to check if data is null
  • Loading branch information
awcodes authored Apr 9, 2024
2 parents 1b4c9f7 + 7008bc7 commit f0e3e34
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/TiptapBlock.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,17 @@ public function getFormSchema(): array

public function getPreview(?array $data = []): string
{
if (! $data) {
$data = [];
}
return view($this->preview, $data)->render();
}

public function getRendered(?array $data = []): string
{
if (! $data) {
$data = [];
}
return view($this->rendered, $data)->render();
}

Expand Down

0 comments on commit f0e3e34

Please sign in to comment.