File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -313,17 +313,17 @@ class Chunk {
313
313
* @returns {-1|0|1 } this is a comparitor function like sort and returns -1, 0, or 1 based on sort order
314
314
*/
315
315
compareTo ( otherChunk ) {
316
- this . _modules . sort ( ) ;
317
- otherChunk . _modules . sort ( ) ;
318
316
if ( this . _modules . size > otherChunk . _modules . size ) return - 1 ;
319
317
if ( this . _modules . size < otherChunk . _modules . size ) return 1 ;
318
+ this . _modules . sort ( ) ;
319
+ otherChunk . _modules . sort ( ) ;
320
320
const a = this . _modules [ Symbol . iterator ] ( ) ;
321
321
const b = otherChunk . _modules [ Symbol . iterator ] ( ) ;
322
322
// eslint-disable-next-line no-constant-condition
323
323
while ( true ) {
324
324
const aItem = a . next ( ) ;
325
- const bItem = b . next ( ) ;
326
325
if ( aItem . done ) return 0 ;
326
+ const bItem = b . next ( ) ;
327
327
const aModuleIdentifier = aItem . value . identifier ( ) ;
328
328
const bModuleIdentifier = bItem . value . identifier ( ) ;
329
329
if ( aModuleIdentifier < bModuleIdentifier ) return - 1 ;
You can’t perform that action at this time.
0 commit comments