Skip to content

Commit

Permalink
Remove Howl from cache when unloaded after failing to load
Browse files Browse the repository at this point in the history
Fixes #978
  • Loading branch information
goldfire committed Jun 22, 2018
1 parent 9879c5d commit a0b4396
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/howler.core.js
Original file line number Diff line number Diff line change
Expand Up @@ -1576,12 +1576,12 @@

// Make sure all timers are cleared out.
self._clearTimer(sounds[i]._id);
}

// Remove the references in the global Howler object.
var index = Howler._howls.indexOf(self);
if (index >= 0) {
Howler._howls.splice(index, 1);
}
// Remove the references in the global Howler object.
var index = Howler._howls.indexOf(self);
if (index >= 0) {
Howler._howls.splice(index, 1);
}

// Delete this sound from the cache (if no other Howl is using it).
Expand Down

0 comments on commit a0b4396

Please sign in to comment.