screeps / engine

ISC License
134 stars 66 forks source link

Fix incorrect return types for Game.market.getHistory() #131

Open SystemParadox opened 4 years ago

SystemParadox commented 4 years ago

Prevent Game.market.getHistory() returning empty objects if resource is invalid or has no data. Return an empty array instead.

Includes a similar fix for underlying code of Game.market.getAllOrders(), which only works correctly at the moment because of the _.filter call.