@@ -52,7 +52,7 @@ BaseLoader.prototype = {
5252
5353 file . path = this . path ;
5454
55- this . list . add ( file ) ;
55+ this . list . set ( file ) ;
5656
5757 return this ;
5858 } ,
@@ -117,7 +117,7 @@ BaseLoader.prototype = {
117117 {
118118 if ( file . state === CONST . FILE_PENDING && _this . inflight . size < _this . maxParallelDownloads )
119119 {
120- _this . inflight . add ( file ) ;
120+ _this . inflight . set ( file ) ;
121121
122122 _this . list . delete ( file ) ;
123123
@@ -156,11 +156,11 @@ BaseLoader.prototype = {
156156
157157 if ( success )
158158 {
159- this . queue . add ( previousFile ) ;
159+ this . queue . set ( previousFile ) ;
160160 }
161161 else
162162 {
163- this . failed . add ( previousFile ) ;
163+ this . failed . set ( previousFile ) ;
164164 }
165165
166166 this . inflight . delete ( previousFile ) ;
@@ -203,7 +203,7 @@ BaseLoader.prototype = {
203203 // This file has failed to load, so move it to the failed Set
204204 if ( file . state === CONST . FILE_ERRORED )
205205 {
206- this . failed . add ( file ) ;
206+ this . failed . set ( file ) ;
207207
208208 if ( file . linkFile )
209209 {
@@ -223,7 +223,7 @@ BaseLoader.prototype = {
223223 {
224224 // Partner has loaded, so add them both to Storage
225225
226- this . storage . add ( { type : file . linkType , fileA : file , fileB : file . linkFile } ) ;
226+ this . storage . set ( { type : file . linkType , fileA : file , fileB : file . linkFile } ) ;
227227
228228 this . queue . delete ( file . linkFile ) ;
229229
@@ -232,7 +232,7 @@ BaseLoader.prototype = {
232232 }
233233 else
234234 {
235- this . storage . add ( file ) ;
235+ this . storage . set ( file ) ;
236236
237237 this . removeFromQueue ( file ) ;
238238 }
0 commit comments