Skip to content

Commit

Permalink
Merge pull request #139 from stevethomas/main
Browse files Browse the repository at this point in the history
Fix setting the name via download()
  • Loading branch information
freekmurze authored May 8, 2024
2 parents ab16dd2 + 134de4b commit 93a6c0b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PdfBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public function footerHtml(string $html): self

public function download(?string $downloadName = null): self
{
$this->downloadName ?? $this->name($downloadName ?? 'download');
$this->downloadName ?: $this->name($downloadName ?? 'download');

$this->addHeaders([
'Content-Type' => 'application/pdf',
Expand Down

0 comments on commit 93a6c0b

Please sign in to comment.