From 6358fd7c97f1ac1c68bb6c379ba060dfb3d20a5d Mon Sep 17 00:00:00 2001 From: JC Brand Date: Thu, 29 Nov 2018 10:41:46 +0100 Subject: [PATCH] Use `finally` --- dist/converse.js | 2 +- src/headless/converse-core.js | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/dist/converse.js b/dist/converse.js index 82dc403ad..f0c582990 100644 --- a/dist/converse.js +++ b/dist/converse.js @@ -63781,7 +63781,7 @@ _converse.initialize = function (settings, callback) { } else { _i18n__WEBPACK_IMPORTED_MODULE_6__["default"].fetchTranslations(_converse.locale, _converse.locales, _converse_headless_utils_core__WEBPACK_IMPORTED_MODULE_11__["default"].interpolate(_converse.locales_url, { 'locale': _converse.locale - })).catch(e => _converse.log(e.message, strophe_js__WEBPACK_IMPORTED_MODULE_0__["Strophe"].LogLevel.FATAL)).then(finishInitialization).catch(_lodash_noconflict__WEBPACK_IMPORTED_MODULE_4___default.a.partial(_converse.log, _lodash_noconflict__WEBPACK_IMPORTED_MODULE_4___default.a, strophe_js__WEBPACK_IMPORTED_MODULE_0__["Strophe"].LogLevel.FATAL)); + })).catch(e => _converse.log(e.message, strophe_js__WEBPACK_IMPORTED_MODULE_0__["Strophe"].LogLevel.FATAL)).finally(finishInitialization); } return init_promise; diff --git a/src/headless/converse-core.js b/src/headless/converse-core.js index b0944efae..f3d2344a4 100644 --- a/src/headless/converse-core.js +++ b/src/headless/converse-core.js @@ -1232,8 +1232,7 @@ _converse.initialize = function (settings, callback) { _converse.locales, u.interpolate(_converse.locales_url, {'locale': _converse.locale})) .catch(e => _converse.log(e.message, Strophe.LogLevel.FATAL)) - .then(finishInitialization) - .catch(_.partial(_converse.log, _, Strophe.LogLevel.FATAL)); + .finally(finishInitialization); } return init_promise; };