Changes

m
Line 188: Line 188:  
     local type = numberKey('type', context, n)
 
     local type = numberKey('type', context, n)
 
     return Iterator.shipsBy(context, n, function(e)
 
     return Iterator.shipsBy(context, n, function(e)
         return e._type == type
+
         return type == nil or e._type == type
 
     end)
 
     end)
 
end
 
end
Line 439: Line 439:  
      
 
      
 
     testIterator('shipsByType', { type = '11', sort = '_class' , listBase = true})
 
     testIterator('shipsByType', { type = '11', sort = '_class' , listBase = true})
 +
    testIterator('shipsByType', { sort = '_name'})
 
     testIterator('shipsBy', { pred = 'is_auxiliary' , sort = '_name'})
 
     testIterator('shipsBy', { pred = 'is_auxiliary' , sort = '_name'})
 
      
 
      
1,024

edits