From 4a9602cc57a9360064f9b9ae1564083d7ca53b84 Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Thu, 7 Nov 2013 22:49:20 +0100 Subject: [PATCH] Fix getRevisionChangeset API call making etherpad crash --- src/node/db/API.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/node/db/API.js b/src/node/db/API.js index 5bb83f029..d0687940a 100644 --- a/src/node/db/API.js +++ b/src/node/db/API.js @@ -187,7 +187,12 @@ exports.getRevisionChangeset = function(padID, rev, callback) //the client wants the latest changeset, lets return it to him else { - callback(null, {"changeset": pad.getRevisionChangeset(pad.getHeadRevisionNumber())}); + pad.getRevisionChangeset(pad.getHeadRevisionNumber(), function(err, changeset) + { + if(ERR(err, callback)) return; + + callback(null, changeset); + }) } }); }