You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-08-18 05:42:00 +03:00
Check thet Olm.Account and Olm.Session are defined before enabling crypto
This commit is contained in:
@@ -22,7 +22,9 @@ var CRYPTO_ENABLED = false;
|
||||
|
||||
try {
|
||||
var Olm = require("olm");
|
||||
CRYPTO_ENABLED = true;
|
||||
if (Olm.Account && Olm.Session) {
|
||||
CRYPTO_ENABLED = true;
|
||||
}
|
||||
} catch (e) {
|
||||
// Olm not installed.
|
||||
}
|
||||
|
Reference in New Issue
Block a user