Closed JoellyR closed 8 years ago
Hi just wanted to let you know that I keep getting the following:
{"line":17,"column":41,"sourceURL":"http://192.168.2.4:8100/lib/pouchdb-upsert/dist/pouchdb.upsert.js"}
Instead of the correct error from this line (which is line 17 in pouchdb.upsert.js):
return PouchPromise.reject(new Error('doc id is required'));
My Code for the upsert is:
return patientDb.upsert(doc._id, function (doc) { return doc; }).then(function (res) { // success, res is {rev: '1-xxx', updated: true} console.log(JSON.stringify(res)); }).catch(function (err) { console.log(JSON.stringify(err)); }); }
Just thought i'd let you know :)
It looks like the reason this is happening is because your doc._id is not defined. It must be defined the first time you pass it in. Hope that helps!
doc._id
Hi just wanted to let you know that I keep getting the following:
{"line":17,"column":41,"sourceURL":"http://192.168.2.4:8100/lib/pouchdb-upsert/dist/pouchdb.upsert.js"}
Instead of the correct error from this line (which is line 17 in pouchdb.upsert.js):
return PouchPromise.reject(new Error('doc id is required'));
My Code for the upsert is:
Just thought i'd let you know :)