Skip to content

Commit

Permalink
getSubNavigation returns empty array, parse_link_picker_json when set…
Browse files Browse the repository at this point in the history
…ting mail content and allow nullable content in parseVariables
  • Loading branch information
jyrkidn committed Dec 5, 2023
1 parent 5475832 commit 89f2131
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,9 @@ protected function resolveRecord($key): Model

return $record;
}

public function getSubNavigation(): array
{
return [];
}
}
4 changes: 2 additions & 2 deletions src/Mail/MailableTemplate.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function content(): Content
view: $this->builder->getView(),
with: [
'item' => $this->item,
'body' => new HtmlString($body),
'body' => new HtmlString(parse_link_picker_json($body)),
],
);
}
Expand Down Expand Up @@ -88,7 +88,7 @@ public function send($mailer)
return $mail;
}

public function parseVariables(string $content): string
public function parseVariables(?string $content): string
{
// Don't parse variables if we're previewing, because we have no data
if ($this->isPreview) {
Expand Down

0 comments on commit 89f2131

Please sign in to comment.