From 902fdded659b8de4cc8b0e466be0b20c3a54d68d Mon Sep 17 00:00:00 2001 From: Khaos Tian Date: Sat, 13 Feb 2016 22:21:54 -0800 Subject: [PATCH] =?UTF-8?q?Address=20the=20problem=20that=20callback=20get?= =?UTF-8?q?=20invoked=20with=20wrong=20signature=20=F0=9F=98=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/bridgeSetupManager.js | 2 +- lib/bridgeSetupSession.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/bridgeSetupManager.js b/lib/bridgeSetupManager.js index 5d61b6c..d256b74 100644 --- a/lib/bridgeSetupManager.js +++ b/lib/bridgeSetupManager.js @@ -55,7 +55,7 @@ BridgeSetupManager.prototype.handleReadRequest = function(callback, context) { } if (!this.session) { - callback(null); + callback(null, null); } else { this.session.handleReadRequest(callback); } diff --git a/lib/bridgeSetupSession.js b/lib/bridgeSetupSession.js index eb70a96..ed8dea9 100644 --- a/lib/bridgeSetupSession.js +++ b/lib/bridgeSetupSession.js @@ -180,5 +180,5 @@ BridgeSetupSession.prototype.sendResponse = function(response) { } BridgeSetupSession.prototype.handleReadRequest = function(callback) { - callback(this.lastResponse); + callback(null, this.lastResponse); } \ No newline at end of file