summaryrefslogtreecommitdiff
path: root/src/node/db
diff options
context:
space:
mode:
authorJohn McLear <john@mclear.co.uk>2014-05-14 14:10:44 +0100
committerJohn McLear <john@mclear.co.uk>2014-05-14 14:10:44 +0100
commit44b1ac2b16412e8cb42eac9082d9aca9bb1b7af4 (patch)
tree5c47b6018d5b28d5785ff8e6d3c7e99a23c04c6c /src/node/db
parent9212ebe9f031f0b50fb96324dfc9f929ca3bc03c (diff)
parent4a9602cc57a9360064f9b9ae1564083d7ca53b84 (diff)
downloadetherpad-lite-44b1ac2b16412e8cb42eac9082d9aca9bb1b7af4.zip
Merge pull request #1984 from ldidry/fix/getRevisionChangeset-crash
Fix getRevisionChangeset API call making etherpad crash
Diffstat (limited to 'src/node/db')
-rw-r--r--src/node/db/API.js7
1 files changed, 6 insertions, 1 deletions
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);
+ })
}
});
}