1
0
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:
Mark Haines
2015-07-23 10:19:41 +01:00
parent 19b4110a51
commit 0737b80850

View File

@@ -22,7 +22,9 @@ var CRYPTO_ENABLED = false;
try {
var Olm = require("olm");
if (Olm.Account && Olm.Session) {
CRYPTO_ENABLED = true;
}
} catch (e) {
// Olm not installed.
}