code refactor

This commit is contained in:
MaysWind 2017-03-28 08:46:54 +08:00
parent e6ff345db5
commit bbbde066ba
2 changed files with 3 additions and 3 deletions

View file

@ -1,7 +1,7 @@
(function () {
'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) {
if (!stat) {
return stat;

View file

@ -17,9 +17,9 @@
for (var i = 1; i < items.length; i++) {
var pairs = items[i].split('=');
if (pairs.length == 1) {
if (pairs.length === 1) {
settings[pairs[0]] = true;
} else if (pairs.length == 2) {
} else if (pairs.length === 2) {
settings[pairs[0]] = pairs[1];
}
}