Do not catch HTML requests in console

Signed-off-by: Michal Čihař <michal@cihar.com>
This commit is contained in:
Michal Čihař 2016-05-11 10:55:24 +02:00
parent edcecdb87d
commit d344a8f7ae

View File

@ -191,7 +191,10 @@ var PMA_console = {
PMA_consoleMessages.showInstructions(PMA_console.config.enterExecutes);
});
$(document).ajaxComplete(function (event, xhr) {
$(document).ajaxComplete(function (event, xhr, ajaxOptions) {
if (ajaxOptions.dataType != 'json') {
return;
}
try {
var data = $.parseJSON(xhr.responseText);
PMA_console.ajaxCallback(data);