check if no sound at index before playing

This commit is contained in:
Eric Rosenbaum 2017-01-08 18:38:18 -05:00
parent 9731a58f0b
commit 3a9e6b8634

View file

@ -108,6 +108,8 @@ AudioPlayer.prototype.loadSounds = function (sounds) {
};
AudioPlayer.prototype.playSound = function (index) {
if (!this.soundPlayers[index]) return;
this.soundPlayers[index].start();
var storedContext = this;