From d2c1e6df270e9cd11fb85619a3facd7e4544d51d Mon Sep 17 00:00:00 2001 From: lilia Date: Tue, 3 Jan 2017 14:15:08 +0100 Subject: [PATCH] Fix wrong variable name Fix potentially setting expiration timeouts more than once. --- js/models/messages.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/models/messages.js b/js/models/messages.js index ac3c3564bd..38d522103a 100644 --- a/js/models/messages.js +++ b/js/models/messages.js @@ -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);