We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7e22368 commit 78c7473Copy full SHA for 78c7473
1 file changed
v3/src/sound/BaseSoundManager.js
@@ -201,9 +201,9 @@ var BaseSoundManager = new Class({
201
this.sounds.sort(function (s1, s2) {
202
return (s1.pendingRemove === s2.pendingRemove) ? 0 : s1 ? 1 : -1;
203
});
204
- for (var i = this.sounds.length - 1; i >= 0; i--) {
205
- if (!this.sounds[i].pendingRemove) {
206
- this.sounds.splice(this.sounds.length - 1 - i);
+ for (var i = 0; i < this.sounds.length; i++) {
+ if (this.sounds[i].pendingRemove) {
+ this.sounds.length = i;
207
break;
208
}
209
0 commit comments