From 9f1593d1c250285877f538fdf9884a9b909c78f5 Mon Sep 17 00:00:00 2001 From: Roland Dalmulder Date: Tue, 10 Oct 2023 17:30:24 +0700 Subject: [PATCH] Fixed setting progress header in case of error Signed-off-by: Roland Dalmulder --- media/com_patchtester/js/fetcher.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/media/com_patchtester/js/fetcher.js b/media/com_patchtester/js/fetcher.js index 8512d11..bb2bfd9 100644 --- a/media/com_patchtester/js/fetcher.js +++ b/media/com_patchtester/js/fetcher.js @@ -82,7 +82,7 @@ class PatchFetcher { } catch (error) { try { if (response.error || response.success === false) { - document.getElementById('patchtester-progress-header').innerText(Joomla.JText._('COM_PATCHTESTER_FETCH_AN_ERROR_HAS_OCCURRED')); + document.getElementById('patchtester-progress-header').innerText = Joomla.JText._('COM_PATCHTESTER_FETCH_AN_ERROR_HAS_OCCURRED'); document.getElementById('patchtester-progress-message').innerHTML = Joomla.sanitizeHtml(response.message); } } catch (ignore) { @@ -90,7 +90,7 @@ class PatchFetcher { error = Joomla.JText._('COM_PATCHTESTER_NO_ERROR_RETURNED'); } - document.getElementById('patchtester-progress-header').innerText(Joomla.JText._('COM_PATCHTESTER_FETCH_AN_ERROR_HAS_OCCURRED')); + document.getElementById('patchtester-progress-header').innerText = Joomla.JText._('COM_PATCHTESTER_FETCH_AN_ERROR_HAS_OCCURRED'); document.getElementById('patchtester-progress-message').innerHTML = Joomla.sanitizeHtml(error); document.getElementById('progress').remove(); } @@ -99,7 +99,7 @@ class PatchFetcher { }, onError: (jqXHR) => { const json = (typeof jqXHR === 'object' && jqXHR.responseText) ? jqXHR.responseText : null; - document.getElementById('patchtester-progress-header').innerText(Joomla.JText._('COM_PATCHTESTER_FETCH_AN_ERROR_HAS_OCCURRED')); + document.getElementById('patchtester-progress-header').innerText = Joomla.JText._('COM_PATCHTESTER_FETCH_AN_ERROR_HAS_OCCURRED'); document.getElementById('patchtester-progress-message').innerHTML = Joomla.sanitizeHtml(json); document.getElementById('progress').remove(); }