Commit 8914d3ea authored by catch's avatar catch
Browse files

Issue #3222107 by codebymikey, bnjmnm, chandu7929, vipin.mittal18, jmickela,...

Issue #3222107 by codebymikey, bnjmnm, chandu7929, vipin.mittal18, jmickela, Shubham Chandra, trickfun, larowlan: [needs backport] Library order asset weights do not work properly when a large number of javascript files is loaded between two jQuery UI libraries
parent 84a8f0ee
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -147,7 +147,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;
@@ -264,7 +264,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