diff --git a/src/PdfBuilder.php b/src/PdfBuilder.php index 309a066..036c5d4 100755 --- a/src/PdfBuilder.php +++ b/src/PdfBuilder.php @@ -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',