avoid undefined users
This commit is contained in:
parent
4bc6155c3f
commit
3e5c3c9a47
1 changed files with 2 additions and 2 deletions
|
@ -37,9 +37,9 @@ oml.ui.folders = function() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function getFolderList(list) {
|
function getFolderList(list) {
|
||||||
var index = users.map(function(user) {
|
var index = users ? users.map(function(user) {
|
||||||
return user.name;
|
return user.name;
|
||||||
}).indexOf(list.user);
|
}).indexOf(list.user) : null;
|
||||||
return list.id == '' ? oml.$ui.librariesList
|
return list.id == '' ? oml.$ui.librariesList
|
||||||
: Ox.endsWith(list.id, ':') ? oml.$ui.libraryList[index]
|
: Ox.endsWith(list.id, ':') ? oml.$ui.libraryList[index]
|
||||||
: oml.$ui.folderList[index];
|
: oml.$ui.folderList[index];
|
||||||
|
|
Loading…
Reference in a new issue