Avoid double-loading dist/core-main.js when apps have scripts named main

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl 2022-03-08 15:37:53 +01:00
parent 23e8ae15aa
commit e8cf1a8759
No known key found for this signature in database
GPG key ID: 4C614C6ED2CDE6DF

View 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;