Skip to content

Commit

Permalink
debugger: use arrow function for lexical this
Browse files Browse the repository at this point in the history
  • Loading branch information
originalfoo committed Jun 25, 2016
1 parent 23999c7 commit 86548a0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/_debug_agent.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,8 @@ function Client(agent, socket) {

this.on('data', this.onCommand);

var self = this;
this.socket.on('close', function() {
self.destroy();
this.socket.on('close', () => {
this.destroy();
});
}
util.inherits(Client, Transform);
Expand Down

0 comments on commit 86548a0

Please sign in to comment.