Allow null expireTimer in sendmessage

pull/749/head
lilia 9 years ago
parent 7eea88a545
commit 86dbbc9f29

@ -38829,7 +38829,7 @@ function Message(options) {
throw new Error('Invalid timestamp'); throw new Error('Invalid timestamp');
} }
if (this.expireTimer !== undefined) { if (this.expireTimer !== undefined && this.expireTimer !== null) {
if (typeof this.expireTimer !== 'number' || !(this.expireTimer >= 0)) { if (typeof this.expireTimer !== 'number' || !(this.expireTimer >= 0)) {
throw new Error('Invalid expireTimer'); throw new Error('Invalid expireTimer');
} }

@ -36,7 +36,7 @@ function Message(options) {
throw new Error('Invalid timestamp'); throw new Error('Invalid timestamp');
} }
if (this.expireTimer !== undefined) { if (this.expireTimer !== undefined && this.expireTimer !== null) {
if (typeof this.expireTimer !== 'number' || !(this.expireTimer >= 0)) { if (typeof this.expireTimer !== 'number' || !(this.expireTimer >= 0)) {
throw new Error('Invalid expireTimer'); throw new Error('Invalid expireTimer');
} }

Loading…
Cancel
Save