mirror of
https://github.com/azures04/crafatar.git
synced 2026-03-21 23:41:18 +01:00
use splice instead of delete
`delete` replaces the value with undefined and doesn't shrink the array size `splice` actually removes the value and shrinkgs the array size
This commit is contained in:
parent
74f1618aa3
commit
1c2c7f0956
@ -104,8 +104,8 @@ function callback_for(uuid, which, err, cape_hash, skin_hash) {
|
||||
if (currently_running[i] && currently_running[i].uuid === uuid && (currently_running[i].which === which || which === null)) {
|
||||
var will_call = currently_running[i];
|
||||
will_call.callback(err, will_call.which === 'skin' ? skin_hash : cape_hash);
|
||||
//remove_from_array(currently_running, i);
|
||||
delete(currently_running[i]);
|
||||
currently_running.splice(i, 1); // remove from array
|
||||
i--;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user