• Welcome to the Kancolle Wiki!
  • If you have any questions regarding site content, account registration, etc., please visit the KanColle Wiki Discord

Changes

Jump to navigation Jump to search
stable sort? -_-
Line 43: Line 43:  
     local sortKey = stringKey('sort', context, n)
 
     local sortKey = stringKey('sort', context, n)
 
     if sortKey then
 
     if sortKey then
         table.sort(collection, function(a, b) return a[sortKey] < b[sortKey] end)
+
         table.sort(collection, function(a, b)
 +
            if a[sortKey] ~= b[sortKey] then
 +
                return a[sortKey] < b[sortKey]
 +
            else
 +
                return a._id < b._id
 +
            end
 +
        end)
 
     end
 
     end
 
     local i = 1
 
     local i = 1
cssedit, gkautomate
6,941

edits

Navigation menu