Skip to content

Commit bb4bf42

Browse files
committed
Minor change
1 parent 4b5a1fe commit bb4bf42

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/lib/indexes.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -327,13 +327,13 @@ class Index<T = Record<string, any>> {
327327
batchSize = 1000,
328328
options?: AddDocumentParams
329329
): Promise<EnqueuedUpdate[]> {
330-
const resultArray = []
331-
for (let i = 0, n = documents.length; i < n; i += batchSize) {
332-
resultArray.push(
330+
const updates = []
331+
for (let i = 0; i < documents.length; i += batchSize) {
332+
updates.push(
333333
await this.addDocuments(documents.slice(i, i + batchSize), options)
334334
)
335335
}
336-
return resultArray
336+
return updates
337337
}
338338

339339
/**
@@ -359,13 +359,13 @@ class Index<T = Record<string, any>> {
359359
batchSize = 1000,
360360
options?: AddDocumentParams
361361
): Promise<EnqueuedUpdate[]> {
362-
const resultArray = []
363-
for (let i = 0, n = documents.length; i < n; i += batchSize) {
364-
resultArray.push(
362+
const updates = []
363+
for (let i = 0; i < documents.length; i += batchSize) {
364+
updates.push(
365365
await this.updateDocuments(documents.slice(i, i + batchSize), options)
366366
)
367367
}
368-
return resultArray
368+
return updates
369369
}
370370

371371
/**

0 commit comments

Comments
 (0)