diff --git a/static/js/folders.js b/static/js/folders.js index 6eab258..0e5016a 100644 --- a/static/js/folders.js +++ b/static/js/folders.js @@ -330,16 +330,18 @@ oml.ui.folders = function() { library = lists.filter(function(list) { return list.user == name && list.type == 'library'; }); - oml.$ui.libraryList[index].options({ - items: library - }); - oml.$ui.folder[index].$content - .css({height: 16 + items.length * 16 + 'px'}); - oml.$ui.folderList[index].options({ - items: items - }) - .css({height: items.length * 16 + 'px'}) - .size(); + if (oml.$ui.libraryList[index]) { + oml.$ui.libraryList[index].options({ + items: library + }); + oml.$ui.folder[index].$content + .css({height: 16 + items.length * 16 + 'px'}); + oml.$ui.folderList[index].options({ + items: items + }) + .css({height: items.length * 16 + 'px'}) + .size(); + } oml.resizeListFolders(); callback && callback(); });