aboutsummaryrefslogtreecommitdiffstats
path: root/src/js
diff options
context:
space:
mode:
Diffstat (limited to 'src/js')
-rw-r--r--src/js/plyr.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/js/plyr.js b/src/js/plyr.js
index d9949722..659f4f95 100644
--- a/src/js/plyr.js
+++ b/src/js/plyr.js
@@ -2980,10 +2980,12 @@
target = plyr.buttons[play ? "pause" : "play"];
// Get the last play button to account for the large play button
- if (target && target.length > 1) {
- target = target[target.length - 1];
- } else {
- target = target[0];
+ if (target) {
+ if (target.length > 1) {
+ target = target[target.length - 1];
+ } else {
+ target = target[0];
+ }
}
// Setup focus and tab focus