From 1769bf84ffeb6ae130a6501fb265caa7e456f756 Mon Sep 17 00:00:00 2001 From: j Date: Tue, 13 Nov 2018 16:40:12 +0000 Subject: [PATCH] make sure result has items --- static/js/folderList.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/static/js/folderList.js b/static/js/folderList.js index 15ae6b659..c97083bfb 100644 --- a/static/js/folderList.js +++ b/static/js/folderList.js @@ -167,7 +167,11 @@ pandora.ui.folderList = function(id, section) { pandora.$ui.mainMenu.updateLists(id, result.data.items); } callback(result); - if (result.data.items.length && _updateItemsCount) { + if ( + _updateItemsCount + && Ox.isArray(result.data.items) + && result.data.items.length + ) { setTimeout(function() { updateItemsCount(result.data.items.map(function(item) { return item.id;