Skip to content

Commit fab234d

Browse files
authored
Merge pull request #300 from matrix-org/rav/handle_no_session_store
Avoid NPE when no sessionStore is given
2 parents a4e2812 + 0c05729 commit fab234d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/client.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ function MatrixClient(opts) {
149149
this._notifTimelineSet = null;
150150

151151
this._crypto = null;
152-
if (CRYPTO_ENABLED && opts.sessionStore !== null &&
152+
if (CRYPTO_ENABLED && Boolean(opts.sessionStore) &&
153153
userId !== null && this.deviceId !== null) {
154154
this._crypto = new Crypto(
155155
this, this,

0 commit comments

Comments
 (0)