diff --git a/modules/blocknewsletter/blocknewsletter.js b/modules/blocknewsletter/blocknewsletter.js index 488dc989a..90caf5352 100644 --- a/modules/blocknewsletter/blocknewsletter.js +++ b/modules/blocknewsletter/blocknewsletter.js @@ -17,8 +17,8 @@ $(document).on('click', '#blocknewsletter .newsletter-btn', function (e) { let messageBlock = $('#blocknewsletter .message-block'); $(messageBlock).html(response.message_html).stop(true, true).fadeIn('fast'); }, - error: function (jqXHR) { - if (jqXHR.readyState == 0) { + error: function () { + if (!onlineFlag) { showErrorMessage(no_internet_txt); } }, diff --git a/themes/hotel-reservation-theme/js/modules/blocknewsletter/blocknewsletter.js b/themes/hotel-reservation-theme/js/modules/blocknewsletter/blocknewsletter.js index 8635bd925..235af017e 100644 --- a/themes/hotel-reservation-theme/js/modules/blocknewsletter/blocknewsletter.js +++ b/themes/hotel-reservation-theme/js/modules/blocknewsletter/blocknewsletter.js @@ -42,8 +42,8 @@ $(document).on('click', '#blocknewsletter .newsletter-btn', function (e) { let messageBlock = $('#blocknewsletter .message-block'); $(messageBlock).html(response.message_html).stop(true, true).fadeIn('fast'); }, - error: function (jqXHR) { - if (jqXHR.readyState == 0) { + error: function () { + if (!onlineFlag) { showErrorMessage(no_internet_txt); } },