Skip to content

Commit dc5ddec

Browse files
committed
Swapped Set.add for Set.set.
1 parent 822b3a9 commit dc5ddec

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

v3/src/checksum.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
var CHECKSUM = {
2-
build: '9354db50-bd64-11e6-b222-331fc2fa5bec'
2+
build: '3ccb42b0-c0bb-11e6-b4bc-27e9a3360164'
33
};
44
module.exports = CHECKSUM;

v3/src/loader/BaseLoader.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)