From fb1601d43cecc206404387fb4d9eccdd0ac28032 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Sat, 8 Mar 2025 22:17:21 +0000 Subject: [PATCH] Fix spa detection --- src/Detector/Rendering.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Detector/Rendering.php b/src/Detector/Rendering.php index 344bd74..ec0df63 100644 --- a/src/Detector/Rendering.php +++ b/src/Detector/Rendering.php @@ -26,9 +26,12 @@ public function detect(): RenderingDetection } // set fallback file for Static if there is only one html file - $htmlFiles = \array_filter($this->inputs, function ($file) { - return \pathinfo($file, PATHINFO_EXTENSION) === 'html'; - }); + $htmlFiles = []; + foreach ($this->inputs as $file) { + if (\pathinfo($file, PATHINFO_EXTENSION) === 'html') { + $htmlFiles[] = $file; + } + } if (\count($htmlFiles) === 1) { return new XStatic($htmlFiles[0]);