Skip to content

Commit

Permalink
(#2832) - don't store 'follows' key for multipart
Browse files Browse the repository at this point in the history
  • Loading branch information
nolanlawson authored and daleharvey committed May 27, 2015
1 parent 773352d commit 2b34e97
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/routes/document.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ module.exports = function(app, PouchDB) {
});
}).on('close', function () {
promise.then(function () {
// don't store the "follows" key
Object.keys(doc._attachments).forEach(function (filename) {
delete doc._attachments[filename].follows;
});
// merge, since it could be a mix of stubs and non-stubs
doc._attachments = extend(true, doc._attachments, attachments);
req.db.put(doc, opts, onResponse);
Expand Down

0 comments on commit 2b34e97

Please sign in to comment.