diff options
author | Robin Appelman <robin@icewind.nl> | 2023-08-15 12:11:08 +0200 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2023-08-17 10:57:56 +0200 |
commit | 37e3115cb472a8d8b16be183c045220835e1fbef (patch) | |
tree | 454ec30c846f1f44be711789ef75cb94a1a455b1 /lib | |
parent | ccf57e0715d81b8d14f01d5e4d21d5962e0e2f8a (diff) | |
download | nextcloud-server-37e3115cb472a8d8b16be183c045220835e1fbef.tar.gz nextcloud-server-37e3115cb472a8d8b16be183c045220835e1fbef.zip |
don't always add core/common and core/main during "sorting"
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/public/Util.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/public/Util.php b/lib/public/Util.php index 63ed9e835c7..1d03c35a9b7 100644 --- a/lib/public/Util.php +++ b/lib/public/Util.php @@ -212,7 +212,12 @@ class Util { $sortedScripts = $sortedScripts ? array_merge(...array_values(($sortedScripts))) : []; // Override core-common and core-main order - array_unshift($sortedScripts, 'core/js/common', 'core/js/main'); + if (in_array('core/js/main', $sortedScripts)) { + array_unshift($sortedScripts, 'core/js/main'); + } + if (in_array('core/js/common', $sortedScripts)) { + array_unshift($sortedScripts, 'core/js/common'); + } return array_unique($sortedScripts); } |