list might be undefine

This commit is contained in:
j 2016-11-19 13:55:29 +02:00
parent 3428ab1fe9
commit 3003cc2c44

View file

@ -1344,7 +1344,7 @@ pandora.ui.mainMenu = function() {
Ox.contains(['list', 'grid', 'clips', 'timelines'], ui.listView) Ox.contains(['list', 'grid', 'clips', 'timelines'], ui.listView)
&& ui.listSelection.length == 1 && ui.listSelection.length == 1
) )
) && pandora.$ui.list.value(ui.listSelection[0], 'editable') ) && pandora.$ui.list && pandora.$ui.list.value(ui.listSelection[0], 'editable')
), ),
canDelete = ( canDelete = (
ui.section == 'items' && ( ui.section == 'items' && (
@ -1355,7 +1355,7 @@ pandora.ui.mainMenu = function() {
) && ( ) && (
pandora.site.capabilities.canRemoveItems[pandora.user.level] || pandora.site.capabilities.canRemoveItems[pandora.user.level] ||
ui.listSelection.every(function(item) { ui.listSelection.every(function(item) {
return pandora.$ui.list.value(item, 'editable'); return pandora.$ui.list && pandora.$ui.list.value(item, 'editable');
}) })
) )
), ),