aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSam Potts <sam@selz.com>2017-11-04 22:17:00 +1100
committerGitHub <noreply@github.com>2017-11-04 22:17:00 +1100
commite44e93c117007da1748d95a13dd9e997822c54ab (patch)
tree892057ae405c0ef5598b7b533d8388da7f011ef3 /src
parenta06a8150ef7d6563d3e620fbe3d1ce53bcbb1e0c (diff)
parentb114a6f42edd4ecb2b760c20151477a9f6119370 (diff)
downloadplyr-e44e93c117007da1748d95a13dd9e997822c54ab.tar.lz
plyr-e44e93c117007da1748d95a13dd9e997822c54ab.tar.xz
plyr-e44e93c117007da1748d95a13dd9e997822c54ab.zip
Merge pull request #617 from oemueller/patch-1
[bugfix] target is null exception
Diffstat (limited to 'src')
-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