From 963a4244515218947ba01d742920caac42694b4d Mon Sep 17 00:00:00 2001 From: lilia Date: Mon, 20 Feb 2017 18:07:23 -0800 Subject: [PATCH] Fix test for presence of registrationId --- dist/libsignal-protocol.js | 2 +- src/SessionRecord.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/libsignal-protocol.js b/dist/libsignal-protocol.js index b9d97c8..9614701 100644 --- a/dist/libsignal-protocol.js +++ b/dist/libsignal-protocol.js @@ -35626,7 +35626,7 @@ Internal.SessionRecord = function() { }, haveOpenSession: function() { var openSession = this.getOpenSession(); - return (!!openSession && !!openSession.registrationId); + return (!!openSession && typeof openSession.registrationId === 'number'); }, getSessionByBaseKey: function(baseKey) { diff --git a/src/SessionRecord.js b/src/SessionRecord.js index c0cb3e6..95e3588 100644 --- a/src/SessionRecord.js +++ b/src/SessionRecord.js @@ -127,7 +127,7 @@ Internal.SessionRecord = function() { }, haveOpenSession: function() { var openSession = this.getOpenSession(); - return (!!openSession && !!openSession.registrationId); + return (!!openSession && typeof openSession.registrationId === 'number'); }, getSessionByBaseKey: function(baseKey) {