diff --git a/src/node/db/API.js b/src/node/db/API.js index 98bc8029..c1050464 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); + }) } }); }