File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -216,7 +216,11 @@ export class NetworkFacade {
216216 let hash : Buffer ;
217217
218218 const partsUploadedBytes : Record < number , number > = { } ;
219- const fileParts : { PartNumber : number ; ETag : string } [ ] = [ ] ;
219+ type Part = {
220+ PartNumber : number ;
221+ ETag : string ;
222+ } ;
223+ const fileParts : Part [ ] = [ ] ;
220224
221225 const onProgress = ( partId : number , loadedBytes : number ) => {
222226 if ( ! options ?. progressCallback ) return ;
@@ -300,7 +304,8 @@ export class NetworkFacade {
300304 }
301305
302306 hash = hashStream . getHash ( ) ;
303- const sortedParts = fileParts . sort ( ( pA , pB ) => pA . PartNumber - pB . PartNumber ) ;
307+ const compareParts = ( pA : Part , pB : Part ) => pA . PartNumber - pB . PartNumber ;
308+ const sortedParts = fileParts . sort ( compareParts ) ;
304309 return {
305310 hash : hash . toString ( 'hex' ) ,
306311 parts : sortedParts ,
You can’t perform that action at this time.
0 commit comments