Skip to content

Commit 6699749

Browse files
committed
fix: don't inject if the content is false
1 parent 26deda1 commit 6699749

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Middleware/InjectBoost.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ private function shouldInject(Response $response): bool
3737
}
3838

3939
$content = $response->getContent();
40+
if ($content === false) {
41+
return false;
42+
}
43+
4044
// Check if it's HTML
4145
if (! str_contains($content, '<html') && ! str_contains($content, '<head')) {
4246
return false;

0 commit comments

Comments
 (0)