File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -823,13 +823,13 @@ export default class Helpers {
823
823
}
824
824
const retry = [ ]
825
825
const { items } = result
826
+ let indexSlice = 0
826
827
for ( let i = 0 , len = items . length ; i < len ; i ++ ) {
827
828
const action = items [ i ]
828
829
const operation = Object . keys ( action ) [ 0 ]
829
830
// @ts -expect-error
830
831
const responseItem = action [ operation as keyof T . BulkResponseItemContainer ]
831
832
assert ( responseItem !== undefined , 'The responseItem is undefined, please file a bug report' )
832
- const indexSlice = operation !== 'delete' ? i * 2 : i
833
833
834
834
if ( responseItem . status >= 400 ) {
835
835
// 429 is the only staus code where we might want to retry
@@ -857,6 +857,7 @@ export default class Helpers {
857
857
} else {
858
858
stats . successful += 1
859
859
}
860
+ operation === 'delete' ? indexSlice += 1 : indexSlice += 2
860
861
}
861
862
callback ( null , retry )
862
863
} )
You can’t perform that action at this time.
0 commit comments