refactor: check config.speeds format

This commit is contained in:
Amo Wu 2016-08-31 15:42:01 +08:00
parent f0ac542a7f
commit c291e8c5d9
No known key found for this signature in database
GPG Key ID: 36F93074E77D0CB6

View File

@ -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) {