diff options
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); } |