]> source.dussan.org Git - nextcloud-server.git/commitdiff
Avoid double-loading dist/core-main.js when apps have scripts named main 31493/head
authorJulius Härtl <jus@bitgrid.net>
Tue, 8 Mar 2022 14:37:53 +0000 (15:37 +0100)
committerJulius Härtl <jus@bitgrid.net>
Tue, 8 Mar 2022 14:37:53 +0000 (15:37 +0100)
Signed-off-by: Julius Härtl <jus@bitgrid.net>
lib/private/Template/JSResourceLocator.php

index 1421e28033a24833b8204b8aa68c1459397b79db..bf84e1ae95860dc07f41dbd9819bfb2a572db12a 100644 (file)
@@ -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;