diff options
author | John Molakvoæ <skjnldsv@users.noreply.github.com> | 2022-03-04 14:37:41 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-04 14:37:41 +0100 |
commit | 821a0dc87594c717e785027b81134bf8783913c9 (patch) | |
tree | 3b94ed75bc6b0478652d97463b68ad49c3a4fd1b /lib | |
parent | 8a52591335f9fc8ac06002dea17705f860487b09 (diff) | |
parent | 58d516b5095150a585cdeddcbbc8ea98133e07ec (diff) | |
download | nextcloud-server-821a0dc87594c717e785027b81134bf8783913c9.tar.gz nextcloud-server-821a0dc87594c717e785027b81134bf8783913c9.zip |
Merge pull request #31387 from nextcloud/fix/common-main-core-script-order
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 b839318303a..cd6f5f34a69 100644 --- a/lib/public/Util.php +++ b/lib/public/Util.php @@ -228,7 +228,12 @@ class Util { $sortedScripts = $scriptSort->sort(self::$scripts, self::$scriptDeps); // Flatten array and remove duplicates - return $sortedScripts ? array_unique(array_merge(...array_values(($sortedScripts)))) : []; + $sortedScripts = $sortedScripts ? array_merge(...array_values(($sortedScripts))) : []; + + // Override core-common and core-main order + array_unshift($sortedScripts, 'core/js/common', 'core/js/main'); + + return array_unique($sortedScripts); } /** |