File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff 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 /**
You can’t perform that action at this time.
0 commit comments