Fix wrong variable name

Fix potentially setting expiration timeouts more than once.
This commit is contained in:
lilia 2017-01-03 14:15:08 +01:00
parent d7f241ddee
commit d2c1e6df27

View file

@ -467,7 +467,7 @@
return ms_from_now;
},
setToExpire: function() {
if (this.isExpiring() && !this.expireTimer) {
if (this.isExpiring() && !this.expirationTimeout) {
var ms_from_now = this.msTilExpire();
console.log('message', this.get('sent_at'), 'expires in', ms_from_now, 'ms');
this.expirationTimeout = setTimeout(this.markExpired.bind(this), ms_from_now);