refactor: check config.speeds format
This commit is contained in:
parent
f0ac542a7f
commit
c291e8c5d9
@ -1983,6 +1983,10 @@
|
|||||||
|
|
||||||
// Speed-up
|
// Speed-up
|
||||||
function _speedup(speed) {
|
function _speedup(speed) {
|
||||||
|
if (!_is.array(config.speeds)) {
|
||||||
|
_warn('Invalid speeds format');
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!_is.number(speed)) {
|
if (!_is.number(speed)) {
|
||||||
var index = config.speeds.indexOf(config.currentSpeed);
|
var index = config.speeds.indexOf(config.currentSpeed);
|
||||||
if (index !== -1) {
|
if (index !== -1) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user