aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--js/shop.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/js/shop.js b/js/shop.js
index 4c04572..a520a38 100644
--- a/js/shop.js
+++ b/js/shop.js
@@ -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]);
}
}