Verified Commit 8a0be0e2 authored by Lee Rowlands's avatar Lee Rowlands
Browse files

Issue #3222107 by codebymikey, bnjmnm, chandu7929, Shubham Chandra, jmickela,...

Issue #3222107 by codebymikey, bnjmnm, chandu7929, Shubham Chandra, jmickela, vipin.mittal18, trickfun, larowlan: Library order asset weights do not work properly when a large number of javascript files is loaded between two jQuery UI libraries

(cherry picked from commit 001d5ab5)
parent 67281b6c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -142,7 +142,7 @@ public function getCssAssets(AttachedAssetsInterface $assets, $optimize) {

          // Always add a tiny value to the weight, to conserve the insertion
          // order.
          $options['weight'] += count($css) / 1000;
          $options['weight'] += count($css) / 30000;

          // CSS files are being keyed by the full path.
          $css[$options['data']] = $options;
@@ -248,7 +248,7 @@ public function getJsAssets(AttachedAssetsInterface $assets, $optimize) {

            // Always add a tiny value to the weight, to conserve the insertion
            // order.
            $options['weight'] += count($javascript) / 1000;
            $options['weight'] += count($javascript) / 30000;

            // Local and external files must keep their name as the associative
            // key so the same JavaScript file is not added twice.
+4 −0
Original line number Diff line number Diff line
/**
 * @file
 * No-op CSS file.
 */
+4 −0
Original line number Diff line number Diff line
/**
 * @file
 * No-op CSS file.
 */
+4 −0
Original line number Diff line number Diff line
/**
 * @file
 * No-op CSS file.
 */
+4 −0
Original line number Diff line number Diff line
/**
 * @file
 * No-op CSS file.
 */
Loading