Skip to content

Commit

Permalink
fallback to _doc if _type is not available
Browse files Browse the repository at this point in the history
  • Loading branch information
ferronrsmith committed Mar 29, 2022
1 parent 1a1e45a commit ee3e0ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/transports/__es__/_data.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ class Data {
}

del (elem, callback) {
const thisUrl = `${this.base.host}/${encodeURIComponent(elem._index)}/${encodeURIComponent(elem._type)}/${encodeURIComponent(elem._id)}`
const thisUrl = `${this.base.host}/${encodeURIComponent(elem._index)}/${encodeURIComponent(elem._type) || '_doc'}/${encodeURIComponent(elem._id)}`

this.parent.emit('debug', `deleteUrl: ${thisUrl}`)
const esRequest = {
Expand Down

0 comments on commit ee3e0ef

Please sign in to comment.