mirror of
https://github.com/scratchfoundation/scratch-audio.git
synced 2024-12-22 14:02:29 -05:00
check if no sound at index before playing
This commit is contained in:
parent
9731a58f0b
commit
3a9e6b8634
1 changed files with 2 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue