diff options
author | John Molakvoæ <skjnldsv@protonmail.com> | 2022-03-01 11:39:27 +0100 |
---|---|---|
committer | John Molakvoæ <skjnldsv@protonmail.com> | 2022-03-04 10:22:56 +0100 |
commit | 58d516b5095150a585cdeddcbbc8ea98133e07ec (patch) | |
tree | 8a8b2b545262213e3e522cecba775fe2d1b57ad9 /lib/public/Util.php | |
parent | ae8a4706cf227edea7f30f2ab34a878fb782e564 (diff) | |
download | nextcloud-server-58d516b5095150a585cdeddcbbc8ea98133e07ec.tar.gz nextcloud-server-58d516b5095150a585cdeddcbbc8ea98133e07ec.zip |
Make sure common and main core scripts are loaded first
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
Diffstat (limited to 'lib/public/Util.php')
-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); } /** |