From dcf08c00a93f406bb30c660f3364c64e9da35dc5 Mon Sep 17 00:00:00 2001 From: iglocska Date: Fri, 23 Dec 2016 13:46:53 +0100 Subject: [PATCH] fix: Fixed a new issue introduced in ajax response handling --- app/webroot/js/misp2.4.58.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/webroot/js/misp2.4.58.js b/app/webroot/js/misp2.4.58.js index 6daaa74f7..0afa61ec3 100644 --- a/app/webroot/js/misp2.4.58.js +++ b/app/webroot/js/misp2.4.58.js @@ -118,7 +118,7 @@ function toggleSetting(e, setting, id) { handleGenericAjaxResponse(data); }, complete:function() { - $.get( replacementForm, function(data) { + $.get(replacementForm, function(data) { $('#hiddenFormDiv').html(data); }); $(".loading").hide(); @@ -442,7 +442,7 @@ function handleAjaxEditResponse(data, name, type, id, field, event) { if (type == 'ShadowAttribute') { updateIndex(event, 'event'); } - if ('undefined' != responseArray['check_publish']) { + if (responseArray.hasOwnProperty('check_publish')) { checkAndSetPublishedInfo(); } } @@ -455,7 +455,7 @@ function handleGenericAjaxResponse(data) { } if (responseArray.saved) { showMessage('success', responseArray.success); - if ('undefined' != responseArray['check_publish']) { + if (responseArray.hasOwnProperty('check_publish')) { checkAndSetPublishedInfo(); } return true;