Prevent error when verifying if play buttons exist

This commit is contained in:
Wilson Alberto 2016-06-13 17:01:46 +01:00
parent c7d28b09c0
commit 80cfabbaf9

View File

@ -1351,7 +1351,7 @@
}
// If there's a play button, set label
if (plyr.supported.full && plyr.buttons.play) {
if (plyr.supported.full && plyr.buttons && plyr.buttons.play) {
for (var i = plyr.buttons.play.length - 1; i >= 0; i--) {
plyr.buttons.play[i].setAttribute('aria-label', label);
}