From 86548a071232a9b7428af415b721006d1e03d78c Mon Sep 17 00:00:00 2001 From: Guy Fraser Date: Sat, 25 Jun 2016 02:14:22 +0100 Subject: [PATCH] debugger: use arrow function for lexical `this` Refs #7414 --- lib/_debug_agent.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/_debug_agent.js b/lib/_debug_agent.js index b20a960fdaaece..3457c6db8ac9d6 100644 --- a/lib/_debug_agent.js +++ b/lib/_debug_agent.js @@ -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);