Skip to content

Commit

Permalink
merge from fex-team#2049
Browse files Browse the repository at this point in the history
  • Loading branch information
lstar committed May 11, 2017
1 parent 1300777 commit 9f4711a
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions src/queue.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,21 +160,19 @@ define([

if ( existing ) {
delete this._map[ file.id ];
this._delFile(file);
file.destroy();
this.stats.numofDeleted++;

}
},

_fileAdded: function( file ) {
var me = this,
existing = this._map[ file.id ];

if ( !existing ) {
this._map[ file.id ] = file;

file.on( 'statuschange', function( cur, pre ) {
me._onFileStatusChange( cur, pre );
});
_delFile : function(file){
for(var i = this._queue.length - 1 ; i >= 0 ; i-- ){
if(this._queue[i] == file){
this._queue.splice(i,1);
break;
}
}
},

Expand Down Expand Up @@ -240,4 +238,4 @@ define([
Mediator.installTo( Queue.prototype );

return Queue;
});
});

0 comments on commit 9f4711a

Please sign in to comment.