Merge "Use native ES5 Array prototype methods instead of jQuery"
[lhc/web/wiklou.git] / resources / src / jquery / jquery.tablesorter.js
index 5ca866e..8aa22a8 100644 (file)
 
        /**
         * Converts sort objects [ { Integer: String }, ... ] to the internally used nested array
-        * structure [ [ Integer , Integer ], ... ]
+        * structure [ [ Integer, Integer ], ... ]
         *
         * @param {Array} sortObjects List of sort objects.
         * @return {Array} List of internal sort definitions.
         */
        function convertSortList( sortObjects ) {
                var sortList = [];
-               $.each( sortObjects, function ( i, sortObject ) {
+               sortObjects.forEach( function ( sortObject ) {
                        $.each( sortObject, function ( columnIndex, order ) {
                                var orderIndex = ( order === 'desc' ) ? 1 : 0;
                                sortList.push( [ parseInt( columnIndex, 10 ), orderIndex ] );