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 c964574 commit 1e9f97b
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 @@ -50,9 +50,8 @@ function Agent() {
this.binding = process._debugAPI;
assert(this.binding, 'Debugger agent running without bindings!');

var self = this;
this.binding.onmessage = function(msg) {
self.clients.forEach(function(client) {
this.binding.onmessage = (msg) => {
this.clients.forEach((client) => {
client.send({}, msg);
});
};
Expand Down

0 comments on commit 1e9f97b

Please sign in to comment.