From 5d05c742c95cefcb6b1c55eb7e23337402006c52 Mon Sep 17 00:00:00 2001 From: Alexander Mays Date: Tue, 2 Feb 2016 09:59:20 -0500 Subject: [PATCH] This fixes an issue exposed during testing with es6 where the scope on the 2nd invocation of handleFollowup isn't set Signed-off-by: Alexander Mays --- RestWrite.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RestWrite.js b/RestWrite.js index ea7b2225e2..4318880edd 100644 --- a/RestWrite.js +++ b/RestWrite.js @@ -362,7 +362,7 @@ RestWrite.prototype.handleFollowup = function() { }; delete this.storage['clearSessions']; return this.config.database.destroy('_Session', sessionQuery) - .then(this.handleFollowup); + .then(this.handleFollowup.bind(this)); } };