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.
This commit is contained in:
parent
0c4d649459
commit
3d7ea52416
5
app.js
5
app.js
|
@ -20,7 +20,10 @@ import translation from './modules/translation/translation';
|
||||||
|
|
||||||
// Initialize Olm as early as possible.
|
// Initialize Olm as early as possible.
|
||||||
if (window.Olm) {
|
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 = {
|
window.APP = {
|
||||||
|
|
Loading…
Reference in New Issue