fix(e2ee) handle Olm initialization error

If the WASM code could not be loaded, fail to initialize if and remove it from
globals so the E2EE option becomes unavailable, since it will be non-functional.
pull/7825/head
Saúl Ibarra Corretgé 5 years ago committed by Saúl Ibarra Corretgé
parent 0c4d649459
commit 3d7ea52416
  1. 5
      app.js

@ -20,7 +20,10 @@ import translation from './modules/translation/translation';
// Initialize Olm as early as possible.
if (window.Olm) {
window.Olm.init();
window.Olm.init().catch(e => {
console.error('Failed to initialize Olm, E2EE will be disabled', e);
delete window.Olm;
});
}
window.APP = {

Loading…
Cancel
Save