forked from 0x2620/pandora
make sure result has items
This commit is contained in:
parent
f67026fc77
commit
1769bf84ff
1 changed files with 5 additions and 1 deletions
|
@ -167,7 +167,11 @@ pandora.ui.folderList = function(id, section) {
|
||||||
pandora.$ui.mainMenu.updateLists(id, result.data.items);
|
pandora.$ui.mainMenu.updateLists(id, result.data.items);
|
||||||
}
|
}
|
||||||
callback(result);
|
callback(result);
|
||||||
if (result.data.items.length && _updateItemsCount) {
|
if (
|
||||||
|
_updateItemsCount
|
||||||
|
&& Ox.isArray(result.data.items)
|
||||||
|
&& result.data.items.length
|
||||||
|
) {
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
updateItemsCount(result.data.items.map(function(item) {
|
updateItemsCount(result.data.items.map(function(item) {
|
||||||
return item.id;
|
return item.id;
|
||||||
|
|
Loading…
Reference in a new issue