Просмотр исходного кода

try and fix error on user without downloader priv on homepage

causefx 7 лет назад
Родитель
Сommit
7cbc5b9aec
1 измененных файлов с 4 добавлено и 1 удалено
  1. 4 1
      js/functions.js

+ 4 - 1
js/functions.js

@@ -4267,7 +4267,10 @@ function buildDownloaderItem(array, source, type='none'){
 function buildDownloader(array, source){
 	var menu = `<ul class="nav customtab nav-tabs pull-right" role="tablist">`;
 	var listing = '';
-	var queueItems = (typeof array.content.queueItems !== 'undefined') ? array.content.queueItems : false;
+	if(typeof array.content == 'undefined'){
+	    return false;
+    }
+    var queueItems = (typeof array.content.queueItems !== 'undefined') ? array.content.queueItems : false;
 	var historyItems = (typeof array.content.historyItems !== 'undefined') ? array.content.historyItems : false;
 	var downloader = (queueItems || historyItems) ? true : false;
 	var state = '';