diff --git a/js/libtextsecure.js b/js/libtextsecure.js index 4627482d..e64ad520 100644 --- a/js/libtextsecure.js +++ b/js/libtextsecure.js @@ -38829,7 +38829,7 @@ function Message(options) { throw new Error('Invalid timestamp'); } - if (this.expireTimer !== undefined) { + if (this.expireTimer !== undefined && this.expireTimer !== null) { if (typeof this.expireTimer !== 'number' || !(this.expireTimer >= 0)) { throw new Error('Invalid expireTimer'); } diff --git a/libtextsecure/sendmessage.js b/libtextsecure/sendmessage.js index f2c90e47..b5027c70 100644 --- a/libtextsecure/sendmessage.js +++ b/libtextsecure/sendmessage.js @@ -36,7 +36,7 @@ function Message(options) { throw new Error('Invalid timestamp'); } - if (this.expireTimer !== undefined) { + if (this.expireTimer !== undefined && this.expireTimer !== null) { if (typeof this.expireTimer !== 'number' || !(this.expireTimer >= 0)) { throw new Error('Invalid expireTimer'); }