From 561a55d075cbbc2f3d69e55767e605da881aa33a Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Tue, 2 Apr 2024 14:57:25 +0530 Subject: [PATCH] Fix for newsletter --- modules/blocknewsletter/blocknewsletter.js | 4 ++-- .../js/modules/blocknewsletter/blocknewsletter.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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); } },