diff --git a/static/js/rightPanel.js b/static/js/rightPanel.js index 60ffc906..21b367be 100644 --- a/static/js/rightPanel.js +++ b/static/js/rightPanel.js @@ -50,7 +50,7 @@ pandora.ui.rightPanel = function() { } else if (pandora.user.ui.itemView == 'player') { pandora.$ui.player.options({width: data.size}); } else if (pandora.user.ui.itemView == 'editor') { - pandora.$ui.editor.options({width: data.size}); + pandora.$ui.editor && pandora.$ui.editor.options({width: data.size}); } else if (pandora.user.ui.listView == 'map') { pandora.$ui.map.resizeMap(); } else if (pandora.user.ui.listView == 'calendar') { diff --git a/static/js/utils.js b/static/js/utils.js index 9f706c5e..b5dfac99 100644 --- a/static/js/utils.js +++ b/static/js/utils.js @@ -2135,9 +2135,9 @@ pandora.resizeFolders = function(section) { ) - 8); Ox.forEach(pandora.$ui.folderList, function($list, id) { var pos = Ox.getIndexById(pandora.site.sectionFolders[section], id); - pandora.$ui.folder[pos].css({width: width + 'px'}); + pandora.$ui.folder[pos] && pandora.$ui.folder[pos].css({width: width + 'px'}); $list.css({width: width + 'px'}); - if (pandora.site.sectionFolders[section][pos].showBrowser) { + if (pandora.site.sectionFolders[section][pos] && pandora.site.sectionFolders[section][pos].showBrowser) { pandora.$ui.findListsInput[id] && pandora.$ui.findListsInput[id].options({ width: width - 24 }); @@ -2146,7 +2146,7 @@ pandora.resizeFolders = function(section) { } else { $list.resizeColumn(id == 'favorite' ? 'id' : 'name', columnWidth); } - if (!pandora.user.ui.showFolder[section][id]) { + if (pandora.$ui.folder[pos] && !pandora.user.ui.showFolder[section][id]) { pandora.$ui.folder[pos].updatePanel(); } });