From 9346c83dc179db89ea34635f9a8018889dd504cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Van=20Rompay?= Date: Thu, 23 Jan 2020 18:53:42 +0100 Subject: [PATCH] fix destructuration of potentially nil value --- src/crypto/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/crypto/index.js b/src/crypto/index.js index 6ef3181c9..46107dc8b 100644 --- a/src/crypto/index.js +++ b/src/crypto/index.js @@ -236,7 +236,7 @@ utils.inherits(Crypto, EventEmitter); Crypto.prototype.init = async function(kwargs) { const { exportedOlmDevice, - } = kwargs; + } = kwargs || {}; logger.log("Crypto: initialising Olm..."); await global.Olm.init();