diff options
author | Amo Wu <amo260@gmail.com> | 2016-08-31 15:42:01 +0800 |
---|---|---|
committer | Amo Wu <amo260@gmail.com> | 2016-08-31 15:42:01 +0800 |
commit | c291e8c5d90710cf7c1afd6f6e50f41333dd67b4 (patch) | |
tree | 1e83aac08a15cbeec1d3389957f460847b7b1aea /src/js/plyr.js | |
parent | f0ac542a7f313c472a869ea522ff3fbcc133ca70 (diff) | |
download | plyr-c291e8c5d90710cf7c1afd6f6e50f41333dd67b4.tar.lz plyr-c291e8c5d90710cf7c1afd6f6e50f41333dd67b4.tar.xz plyr-c291e8c5d90710cf7c1afd6f6e50f41333dd67b4.zip |
refactor: check config.speeds format
Diffstat (limited to 'src/js/plyr.js')
-rw-r--r-- | src/js/plyr.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/js/plyr.js b/src/js/plyr.js index eb7b9f2d..a676f635 100644 --- a/src/js/plyr.js +++ b/src/js/plyr.js @@ -1983,6 +1983,10 @@ // Speed-up function _speedup(speed) { + if (!_is.array(config.speeds)) { + _warn('Invalid speeds format'); + return; + } if (!_is.number(speed)) { var index = config.speeds.indexOf(config.currentSpeed); if (index !== -1) { |