1.1.0
This commit is contained in:
parent
6d66509ab8
commit
e346230938
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "pouchdb-quick-search",
|
||||
"version": "1.0.2",
|
||||
"version": "1.1.0",
|
||||
"description": "PouchDB Quick Search - persisted full-text search for PouchDB",
|
||||
"main": "dist/pouchdb.quick-search.js",
|
||||
"homepage": "https://github.com/nolanlawson/pouchdb-quick-search",
|
||||
|
|
|
@ -4493,21 +4493,12 @@ function upsertInner(db, docId, diffFun) {
|
|||
}
|
||||
doc = {};
|
||||
}
|
||||
|
||||
// the user might change the _rev, so save it for posterity
|
||||
var docRev = doc._rev;
|
||||
var newDoc = diffFun(doc);
|
||||
|
||||
if (!newDoc) {
|
||||
// if the diffFun returns falsy, we short-circuit as
|
||||
// an optimization
|
||||
return fulfill({updated: false, rev: docRev});
|
||||
return fulfill({updated: false, rev: doc._rev});
|
||||
}
|
||||
|
||||
// users aren't allowed to modify these values,
|
||||
// so reset them here
|
||||
newDoc._id = docId;
|
||||
newDoc._rev = docRev;
|
||||
newDoc._rev = doc._rev;
|
||||
fulfill(tryAndPut(db, newDoc, diffFun));
|
||||
});
|
||||
});
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "pouchdb-quick-search",
|
||||
"version": "1.0.2",
|
||||
"version": "1.1.0",
|
||||
"description": "PouchDB Quick Search - persisted full-text search for PouchDB",
|
||||
"main": "index.js",
|
||||
"repository": {
|
||||
|
|
Loading…
Reference in New Issue