klei / gulp-angular-filesort

Automatically sort AngularJS app files depending on module definitions and usage
MIT License
132 stars 46 forks source link

Don't reverse array is there is nothing to sort. #34

Closed matthiassb closed 8 years ago

matthiassb commented 9 years ago

I believe this resolves issue many folks are having. The original code made the assumption that the files passed to angular-file-sort are not in the correct order (unlikely but does occur). Reversing of the array should only occur if toSort has some elements in it.

I believe this PR address #30 #27 please look over this and let me know if I am correct in my analysis