Final fix for remove function.
This commit is contained in:
parent
39ce040b1c
commit
647a8c2a74
|
@ -64,7 +64,9 @@ export class DDInstrumentedDatabase implements Database {
|
||||||
): Promise<DocumentDestroyResponse> {
|
): Promise<DocumentDestroyResponse> {
|
||||||
return tracer.trace("db.remove", span => {
|
return tracer.trace("db.remove", span => {
|
||||||
span?.addTags({ db_name: this.name, doc_id: idOrDoc })
|
span?.addTags({ db_name: this.name, doc_id: idOrDoc })
|
||||||
const id: string = typeof idOrDoc === "object" ? idOrDoc._id! : idOrDoc
|
const isDocument = typeof idOrDoc === "object"
|
||||||
|
const id = isDocument ? idOrDoc._id! : idOrDoc
|
||||||
|
rev = isDocument ? idOrDoc._rev : rev
|
||||||
return this.db.remove(id, rev)
|
return this.db.remove(id, rev)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue