Fixed setting progress header in case of error

Signed-off-by: Roland Dalmulder <contact@rolandd.com>
This commit is contained in:
Roland Dalmulder 2023-10-10 17:30:24 +07:00
parent 3c132ba2e8
commit 9f1593d1c2
No known key found for this signature in database
GPG Key ID: 6D30CD38749A5B9E
1 changed files with 3 additions and 3 deletions

View File

@ -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();
}