From 0737b808501da43497d0f118a73ab63f169900b9 Mon Sep 17 00:00:00 2001 From: Mark Haines Date: Thu, 23 Jul 2015 10:19:41 +0100 Subject: [PATCH] Check thet Olm.Account and Olm.Session are defined before enabling crypto --- lib/client.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/client.js b/lib/client.js index 682262368..925fdc4d3 100644 --- a/lib/client.js +++ b/lib/client.js @@ -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. }