Removes JS error when clicking on "play sound until done" with no sound selected

pull/89/head
Bernat Romagosa 2019-02-20 09:22:11 +01:00
rodzic 7fc78b053b
commit d05b7becc0
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -2226,7 +2226,7 @@ Process.prototype.doPlaySoundUntilDone = function (name) {
if (this.context.activeAudio === null) {
this.context.activeAudio = sprite.playSound(name);
}
if (this.context.activeAudio.ended
if (name === null || this.context.activeAudio.ended
|| this.context.activeAudio.terminated) {
return null;
}