[WebUI] Add check to avoid type error after logout

This commit is contained in:
Chocobo1
2017-11-02 20:58:55 +08:00
committed by sledgehammer999
parent ade50d2b53
commit 1fa2957d27

View File

@@ -280,7 +280,9 @@ window.addEvent('load', function () {
noCache : true,
method : 'get',
onFailure : function () {
$('error_div').set('html', 'QBT_TR(qBittorrent client is not reachable)QBT_TR[CONTEXT=HttpServer]');
var errorDiv = $('error_div');
if (errorDiv)
errorDiv.set('html', 'QBT_TR(qBittorrent client is not reachable)QBT_TR[CONTEXT=HttpServer]');
clearTimeout(syncMainDataTimer);
syncMainDataTimer = syncMainData.delay(2000);
},