From dab552c255e2b9cac8a2d199f4b43ebe517e4a4f Mon Sep 17 00:00:00 2001 From: Jimmy Z Date: Thu, 10 Mar 2016 14:55:29 +0800 Subject: [PATCH] will still try default if cookie config failed --- js/services/rpc/rpc.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/js/services/rpc/rpc.js b/js/services/rpc/rpc.js index 549b55b..df40545 100644 --- a/js/services/rpc/rpc.js +++ b/js/services/rpc/rpc.js @@ -9,16 +9,15 @@ angular function(syscall, globalTimeout, alerts, utils, rootScope, uri, authconf) { var subscriptions = [] - , configurations + , configurations = [authconf] , currentConf = {} , currentToken , timeout = null , forceNextUpdate = false; var cookieConf = utils.getCookie('aria2conf'); - // try at the start, so that it is presistant even when default authconf works - configurations = [cookieConf ? cookieConf : authconf]; + if(cookieConf) configurations.unshift(cookieConf); if (['http', 'https'].indexOf(uri.protocol()) != -1 && uri.host() != 'localhost') { console.log(uri.host());