From 3e5c3c9a478c6dd1065929bd33d389f50bbce845 Mon Sep 17 00:00:00 2001 From: j Date: Mon, 6 Jun 2016 19:34:43 +0200 Subject: [PATCH] avoid undefined users --- static/js/folders.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static/js/folders.js b/static/js/folders.js index 0e5016a..02bf4ce 100644 --- a/static/js/folders.js +++ b/static/js/folders.js @@ -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];