Use finally

This commit is contained in:
JC Brand 2018-11-29 10:41:46 +01:00
parent 4e6ac905b8
commit 6358fd7c97
2 changed files with 2 additions and 3 deletions

2
dist/converse.js vendored
View File

@ -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;

View File

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