Wrap `history.start` in try/catch clause.
This commit is contained in:
JC Brand 2021-02-24 15:48:11 +01:00
parent d8cab006c8
commit ce1c5ec7f6
2 changed files with 6 additions and 2 deletions

View File

@ -1563,7 +1563,11 @@ Object.assign(converse, {
initPlugins(); initPlugins();
registerGlobalEventHandlers(); registerGlobalEventHandlers();
try {
!History.started && _converse.router.history.start(); !History.started && _converse.router.history.start();
} catch (e) {
log.error(e);
}
if (api.settings.get("idle_presence_timeout") > 0) { if (api.settings.get("idle_presence_timeout") > 0) {
api.listen.on('addClientFeatures', () => api.disco.own.features.add(Strophe.NS.IDLE)); api.listen.on('addClientFeatures', () => api.disco.own.features.add(Strophe.NS.IDLE));

View File

@ -24,7 +24,7 @@ export async function getHeadingStandaloneButton (promise_or_data) {
`; `;
} }
async function clearMessages (chat) { export async function clearMessages (chat) {
const result = confirm(__('Are you sure you want to clear the messages from this conversation?')); const result = confirm(__('Are you sure you want to clear the messages from this conversation?'));
if (result === true) { if (result === true) {
await chat.clearMessages(); await chat.clearMessages();