code refactor
This commit is contained in:
parent
bb41b52917
commit
373ead126a
|
@ -27,7 +27,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
var loadOptions = function (type) {
|
var loadOptions = function (type) {
|
||||||
var keys = aria2SettingService.getaria2QuickSettingsAvailableOptions(type);
|
var keys = aria2SettingService.getAria2QuickSettingsAvailableOptions(type);
|
||||||
|
|
||||||
if (!keys) {
|
if (!keys) {
|
||||||
ariaNgCommonService.showError('Type is illegal!');
|
ariaNgCommonService.showError('Type is illegal!');
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getaria2QuickSettingsAvailableOptions: function (type) {
|
getAria2QuickSettingsAvailableOptions: function (type) {
|
||||||
if (type === 'globalSpeedLimit') {
|
if (type === 'globalSpeedLimit') {
|
||||||
return aria2QuickSettingsAvailableOptions.globalSpeedLimitOptions;
|
return aria2QuickSettingsAvailableOptions.globalSpeedLimitOptions;
|
||||||
} else {
|
} else {
|
||||||
|
|
Reference in a new issue