diff options
Diffstat (limited to 'js')
-rw-r--r-- | js/shop.js | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -17,8 +17,9 @@ function displayShop(ret) { } function displayInventory(items) { - for(var i=0; i < items.length; i++) { - addItem(items[i]); + for(var key in items) { + if(items.hasOwnProperty(key)) + addItem(items[key]); } } |