code refactor
This commit is contained in:
parent
e6ff345db5
commit
bbbde066ba
|
@ -1,7 +1,7 @@
|
||||||
(function () {
|
(function () {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
angular.module('ariaNg').factory('aria2SettingService', ['aria2AllOptions', 'aria2GlobalAvailableOptions', 'aria2TaskAvailableOptions', 'ariaNgCommonService', 'aria2RpcService', 'ariaNgLogService', function (aria2AllOptions, aria2GlobalAvailableOptions, aria2TaskAvailableOptions, ariaNgCommonService, aria2RpcService, ariaNgLogService) {
|
angular.module('ariaNg').factory('aria2SettingService', ['aria2AllOptions', 'aria2GlobalAvailableOptions', 'aria2TaskAvailableOptions', 'aria2RpcService', 'ariaNgLogService', function (aria2AllOptions, aria2GlobalAvailableOptions, aria2TaskAvailableOptions, aria2RpcService, ariaNgLogService) {
|
||||||
var processStatResult = function (stat) {
|
var processStatResult = function (stat) {
|
||||||
if (!stat) {
|
if (!stat) {
|
||||||
return stat;
|
return stat;
|
||||||
|
|
|
@ -17,9 +17,9 @@
|
||||||
for (var i = 1; i < items.length; i++) {
|
for (var i = 1; i < items.length; i++) {
|
||||||
var pairs = items[i].split('=');
|
var pairs = items[i].split('=');
|
||||||
|
|
||||||
if (pairs.length == 1) {
|
if (pairs.length === 1) {
|
||||||
settings[pairs[0]] = true;
|
settings[pairs[0]] = true;
|
||||||
} else if (pairs.length == 2) {
|
} else if (pairs.length === 2) {
|
||||||
settings[pairs[0]] = pairs[1];
|
settings[pairs[0]] = pairs[1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue