[bugfix] target is null exception
when using 'play-large' without a 'play' button, the statement target = target[0]; caused an error. So it is necessary to check the value of target before accessing [0]
This commit is contained in:
parent
6828bc00f8
commit
b114a6f42e
@ -2850,10 +2850,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
|
||||
|
Loading…
x
Reference in New Issue
Block a user