handle undefined player.elements.buttons.play

This commit is contained in:
Michael DePetrillo 2018-06-25 12:00:02 +02:00
parent 86406ee59a
commit b6ddf144f4

View File

@ -431,9 +431,11 @@ class Listeners {
}; };
// Play/pause toggle // Play/pause toggle
Array.from(this.player.elements.buttons.play).forEach(button => { if (this.player.elements.buttons.play) {
bind(button, 'click', this.player.togglePlay, 'play'); Array.from(this.player.elements.buttons.play).forEach(button => {
}); bind(button, 'click', this.player.togglePlay, 'play');
});
}
// Pause // Pause
bind(this.player.elements.buttons.restart, 'click', this.player.restart, 'restart'); bind(this.player.elements.buttons.restart, 'click', this.player.restart, 'restart');