We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2fc79bd commit 435cb91Copy full SHA for 435cb91
packages/search/lib/commands/SEARCH.ts
@@ -73,11 +73,14 @@ export type SearchRawReply = Array<any>;
73
export function transformReply(reply: SearchRawReply, withoutDocuments: boolean): SearchReply {
74
const documents = [];
75
let i = 1;
76
+
77
while (i < reply.length) {
78
documents.push({
- id: reply[i++],
79
- value: withoutDocuments ? Object.create(null) : documentValue(reply[i++])
+ id: reply[i],
80
+ value: withoutDocuments || reply[i+1] == null ? Object.create(null) : documentValue(reply[i+1])
81
});
82
83
+ i += 2;
84
}
85
86
return {
0 commit comments