Allow null expireTimer in sendmessage

This commit is contained in:
lilia 2016-10-03 08:38:20 +09:00
parent 7eea88a545
commit 86dbbc9f29
2 changed files with 2 additions and 2 deletions

View file

@ -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');
}

View file

@ -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');
}