summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bin/rebuildPad.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/bin/rebuildPad.js b/bin/rebuildPad.js
index c8383342..60c5f4ed 100644
--- a/bin/rebuildPad.js
+++ b/bin/rebuildPad.js
@@ -79,6 +79,9 @@ async.series([
newPad.pool.numToAttrib = oldPad.pool.numToAttrib;
for(var curRevNum = 0; curRevNum <= newRevHead; curRevNum++) {
db.db.get("pad:" + padId + ":revs:" + curRevNum, function(err, rev) {
+ if (rev.meta) {
+ throw "The specified revision number could not be found.";
+ }
var newRevNum = ++newPad.head;
var newRevId = "pad:" + newPad.id + ":revs:" + newRevNum;
db.db.set(newRevId, rev);