Description
React version:
17.0.2
Steps To Reproduce
-
Calling this code giving exception -
-
updateCompanyConfiguration({
_rev:
companyConfigurations && companyConfigurations._rev
? companyConfigurations._rev
: "",
...$_companyConfiguration,
})
.then((response) => {
if (response.ok) {
console.log(response);
}
})
.catch((error) => {
console.log(error);
}); -
Code is giving exception-
export function updateCompanyConfiguration(doc) {
let _rev = doc._rev;
delete doc._rev;
return companyConfigurationDB.put({
_id: "1",
_rev: _rev,
...doc,
});
} -
Exception
Exception: at new CustomPouchError (http://localhost:3000/static/js/vendors~main.chunk.js:162322:20)
at createError (http://localhost:3000/static/js/vendors~main.chunk.js:162331:10)
at updateDoc (http://localhost:3000/static/js/vendors~main.chunk.js:165828:15)
at nextDoc (http://localhost:3000/static/js/vendors~main.chunk.js:165927:9)
at http://localhost:3000/static/js/vendors~main.chunk.js:165936:5
at Map.forEach ()
at processDocs (http://localhost:3000/static/js/vendors~main.chunk.js:165913:13)
at idbProcessDocs (http://localhost:3000/static/js/vendors~main.chunk.js:166255:5)
at checkDone (http://localhost:3000/static/js/vendors~main.chunk.js:166273:9)
at IDBRequest.readMetadata (http://localhost:3000/static/js/vendors~main.chunk.js:166281:7)

Link to code example: