fix(gui): null pointer exception verification

This commit is contained in:
JigSawFr 2017-08-20 14:05:57 +02:00
parent 26dd740a53
commit aa02644e05
1 changed files with 5 additions and 1 deletions

View File

@ -612,7 +612,11 @@ function populateSetupForm(indexerId, name, config, caps, link, alternativesitel
doNotify("Configuration failed: " + data.error, "danger", "glyphicon glyphicon-alert");
}
}).fail(function (data) {
doNotify("An error occured while updating this indexer: " + data.responseJSON.error, "danger", "glyphicon glyphicon-alert");
if(data.responseJSON.error !== undefined) {
doNotify("An error occured while updating this indexer: " + data.responseJSON.error, "danger", "glyphicon glyphicon-alert");
} else {
doNotify("An error occured while updating this index, request to Jackett server failed, is server running ?", "danger", "glyphicon glyphicon-alert");
}
}).always(function () {
$goButton.html(originalBtnText);
$goButton.prop('disabled', false);