diff --git a/src/node/db/API.js b/src/node/db/API.js index be3e73486..8c8e515cd 100644 --- a/src/node/db/API.js +++ b/src/node/db/API.js @@ -184,17 +184,17 @@ exports.getRevisionChangeset = function(padID, rev, callback) callback(null, changeset); }) - } - //the client wants the latest changeset, lets return it to him - else - { - pad.getRevisionChangeset(pad.getHeadRevisionNumber(), function(err, changeset) - { - if(ERR(err, callback)) return; - callback(null, changeset); - }) + return; } + + //the client wants the latest changeset, lets return it to him + pad.getRevisionChangeset(pad.getHeadRevisionNumber(), function(err, changeset) + { + if(ERR(err, callback)) return; + + callback(null, changeset); + }) }); }