avoid undefined users

This commit is contained in:
j 2016-06-06 19:34:43 +02:00
parent 4bc6155c3f
commit 3e5c3c9a47
1 changed files with 2 additions and 2 deletions

View File

@ -37,9 +37,9 @@ oml.ui.folders = function() {
}
function getFolderList(list) {
var index = users.map(function(user) {
var index = users ? users.map(function(user) {
return user.name;
}).indexOf(list.user);
}).indexOf(list.user) : null;
return list.id == '' ? oml.$ui.librariesList
: Ox.endsWith(list.id, ':') ? oml.$ui.libraryList[index]
: oml.$ui.folderList[index];