Skip to content

Commit

Permalink
Merge pull request #5225 from hulkish/feature/added-chunk-sortModules…
Browse files Browse the repository at this point in the history
…-method

added sortModules method to Chunk class
  • Loading branch information
sokra committed Jul 6, 2017
2 parents 0ab36c4 + 5f08aa4 commit 2879fb3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/Chunk.js
Expand Up @@ -421,8 +421,12 @@ class Chunk {
};
}

sortModules(sortByFn) {
this._modules.sortWith(sortByFn || sortById);
}

sortItems() {
this._modules.sortWith(sortById);
this.sortModules();
this.origins.sort((a, b) => {
const aIdent = a.module.identifier();
const bIdent = b.module.identifier();
Expand Down

0 comments on commit 2879fb3

Please sign in to comment.