diff --git a/js/services/rpc/rpc.js b/js/services/rpc/rpc.js index 5c99698..3c6142b 100644 --- a/js/services/rpc/rpc.js +++ b/js/services/rpc/rpc.js @@ -25,7 +25,9 @@ function(syscall, time, alerts, utils, rootScope, uri) { } var cookieConf = utils.getCookie('aria2conf'); - if (cookieConf) configurations.unshift(cookieConf); + + // try at the end, so that it is not overwridden in case it doesnt work + if (cookieConf) configurations.push(cookieConf); // update is implemented such that // only one syscall at max is ongoing diff --git a/js/services/utils.js b/js/services/utils.js index dcb49d0..a11827a 100644 --- a/js/services/utils.js +++ b/js/services/utils.js @@ -18,6 +18,8 @@ angular.module('webui.services.utils', []) return JSON.parse(unescape(cvalue)); } } + + return null; }, getFileName: function(path) { var seed = path.split(/[/\\]/);