Merge pull request #2831 from fcassin/develop

Protect against a null atext value in cloneAText
This commit is contained in:
John McLear 2015-12-01 17:50:29 +00:00
commit f44c444720
2 changed files with 12 additions and 5 deletions

View file

@ -188,7 +188,12 @@ Pad.prototype.getInternalRevisionAText = function getInternalRevisionAText(targe
db.getSub("pad:"+_this.id+":revs:"+keyRev, ["meta", "atext"], function(err, _atext)
{
if(ERR(err, callback)) return;
atext = Changeset.cloneAText(_atext);
try {
atext = Changeset.cloneAText(_atext);
} catch (e) {
return callback(e);
}
callback();
});
},