From 44f460cb119659501d2cc317e19f7c435e79b70b Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Fri, 4 Sep 2015 12:17:01 +0930 Subject: [PATCH] Prevent ItemList crash when item is a number --- js/lib/utils/ItemList.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/js/lib/utils/ItemList.js b/js/lib/utils/ItemList.js index 6e631dcf6..16d1a405e 100644 --- a/js/lib/utils/ItemList.js +++ b/js/lib/utils/ItemList.js @@ -50,9 +50,7 @@ export default class ItemList { for (const i in this) { if (this.hasOwnProperty(i) && this[i] instanceof Item) { - if (typeof this[i].content === 'string') { - this[i].content = new String(this[i].content); - } + this[i].content = Object(this[i].content); this[i].content.itemName = i; items.push(this[i]);