Fix exceptions on window close
The stopListening function was being passed the close event as an argument, which caused it to throw. // FREEBIE
This commit is contained in:
parent
49cdc98386
commit
25b0fbd949
1 changed files with 3 additions and 1 deletions
|
@ -25,7 +25,9 @@
|
||||||
this.listenTo(this.model.messageCollection, 'add remove', updateLastMessage);
|
this.listenTo(this.model.messageCollection, 'add remove', updateLastMessage);
|
||||||
this.listenTo(this.model, 'newmessage', updateLastMessage);
|
this.listenTo(this.model, 'newmessage', updateLastMessage);
|
||||||
|
|
||||||
extension.windows.onClosed(this.stopListening.bind(this));
|
extension.windows.onClosed(function() {
|
||||||
|
this.stopListening();
|
||||||
|
}.bind(this));
|
||||||
this.timeStampView = new Whisper.TimestampView({brief: true});
|
this.timeStampView = new Whisper.TimestampView({brief: true});
|
||||||
this.model.updateLastMessage();
|
this.model.updateLastMessage();
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue