EspoCRM – Open Source CRM Application
PHP calendarcontactscrmcrm-platformcrm-systemcustomer-portalcustomer-supportcustomizabledocumentsemail-marketingkanbanleadsopen-sourcephpplatformsales-automationsingle-page-applicationsupport
loader error callback fix
Yuri Kuznetsov876b74aefcba
diff --git a/client/src/loader.js b/client/src/loader.jsindex bab05c453d..c2b43ee8f2 100644--- a/client/src/loader.js+++ b/client/src/loader.js@@ -763,7 +763,7 @@}console.warn(`Could not obtain ${id}.`);- });+ }, errorCallback);return;}@@ -792,9 +792,10 @@* @private* @param {string} url* @param {function} callback+ * @param {function|null} [errorCallback]* @return {Promise}*/- _addScript(url, callback) {+ _addScript(url, callback, errorCallback = null) {const script = document.createElement('script');script.src = url;@@ -802,6 +803,10 @@script.addEventListener('error', e => {console.error(`Could not load script '${url}'.`, e);++ if (errorCallback) {+ errorCallback();+ }});document.head.appendChild(script);