From e8cf1a87599abf48d22042e79a0d61910935ee42 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Julius=20H=C3=A4rtl?= Date: Tue, 8 Mar 2022 15:37:53 +0100 Subject: [PATCH] Avoid double-loading dist/core-main.js when apps have scripts named main MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- lib/private/Template/JSResourceLocator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/private/Template/JSResourceLocator.php b/lib/private/Template/JSResourceLocator.php index 1421e28033a..bf84e1ae958 100644 --- a/lib/private/Template/JSResourceLocator.php +++ b/lib/private/Template/JSResourceLocator.php @@ -74,7 +74,7 @@ class JSResourceLocator extends ResourceLocator { || $this->cacheAndAppendCombineJsonIfExist($this->serverroot, $script.'.json') || $this->appendIfExist($this->serverroot, $theme_dir.'core/'.$script.'.js') || $this->appendIfExist($this->serverroot, 'core/'.$script.'.js') - || $this->appendIfExist($this->serverroot, "dist/core-$scriptName.js") + || (strpos($scriptName, '/') === -1 && $this->appendIfExist($this->serverroot, "dist/core-$scriptName.js")) || $this->cacheAndAppendCombineJsonIfExist($this->serverroot, 'core/'.$script.'.json') ) { return; -- 2.39.5