Merge pull request #1984 from ldidry/fix/getRevisionChangeset-crash

Fix getRevisionChangeset API call making etherpad crash
pull/2210/head
John McLear 2014-05-14 14:10:44 +01:00
commit 44b1ac2b16
1 changed files with 6 additions and 1 deletions

View File

@ -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);
})
}
});
}