Skip to content

Commit

Permalink
Merge pull request #38 from truevault/bugfix/get-document-v2
Browse files Browse the repository at this point in the history
Update index.js
  • Loading branch information
jason-w authored Sep 15, 2021
2 parents 40caf6b + a24e5f3 commit 0ab4593
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -993,12 +993,6 @@ class TrueVaultClient {
let requestDocumentIds;
if (documentIds.length === 0) {
return [];
} else if (documentIds.length === 1) {
// Sending a single ID to the API will only return the document's contents. In order to
// retrieve a proper multiget response with `id` and `owner_id`, we need to send a
// request with two instances of the same document ID. We will then only return the
// first result from the response.
requestDocumentIds = [documentIds[0], documentIds[0]];
} else {
requestDocumentIds = documentIds;
}
Expand Down

0 comments on commit 0ab4593

Please sign in to comment.