Fix wrong variable name
Fix potentially setting expiration timeouts more than once.
This commit is contained in:
parent
d7f241ddee
commit
d2c1e6df27
1 changed files with 1 additions and 1 deletions
|
@ -467,7 +467,7 @@
|
||||||
return ms_from_now;
|
return ms_from_now;
|
||||||
},
|
},
|
||||||
setToExpire: function() {
|
setToExpire: function() {
|
||||||
if (this.isExpiring() && !this.expireTimer) {
|
if (this.isExpiring() && !this.expirationTimeout) {
|
||||||
var ms_from_now = this.msTilExpire();
|
var ms_from_now = this.msTilExpire();
|
||||||
console.log('message', this.get('sent_at'), 'expires in', ms_from_now, 'ms');
|
console.log('message', this.get('sent_at'), 'expires in', ms_from_now, 'ms');
|
||||||
this.expirationTimeout = setTimeout(this.markExpired.bind(this), ms_from_now);
|
this.expirationTimeout = setTimeout(this.markExpired.bind(this), ms_from_now);
|
||||||
|
|
Loading…
Reference in a new issue