From c8dd72d1515d7d4eafda27fa4384f0892e7877b5 Mon Sep 17 00:00:00 2001 From: MaysWind Date: Sat, 3 Aug 2019 02:28:22 +0800 Subject: [PATCH] fix operator bug --- src/scripts/services/aria2RpcService.js | 4 ++-- src/scripts/services/aria2TaskService.js | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/scripts/services/aria2RpcService.js b/src/scripts/services/aria2RpcService.js index 1cc88b6..a7e578d 100644 --- a/src/scripts/services/aria2RpcService.js +++ b/src/scripts/services/aria2RpcService.js @@ -93,8 +93,8 @@ contexts[i].callback = function (response) { results.push(response); - hasSuccess = hasSuccess | response.success; - hasError = hasError | !response.success; + hasSuccess = hasSuccess || response.success; + hasError = hasError || !response.success; }; promises.push(methodFunc(contexts[i])); diff --git a/src/scripts/services/aria2TaskService.js b/src/scripts/services/aria2TaskService.js index 8a9eb6c..b3c5687 100644 --- a/src/scripts/services/aria2TaskService.js +++ b/src/scripts/services/aria2TaskService.js @@ -811,8 +811,8 @@ silent: !!silent, callback: function (response) { ariaNgCommonService.pushArrayTo(results, response.results); - hasSuccess = hasSuccess | response.hasSuccess; - hasError = hasError | response.hasError; + hasSuccess = hasSuccess || response.hasSuccess; + hasError = hasError || response.hasError; } })); } @@ -823,8 +823,8 @@ silent: !!silent, callback: function (response) { ariaNgCommonService.pushArrayTo(results, response.results); - hasSuccess = hasSuccess | response.hasSuccess; - hasError = hasError | response.hasError; + hasSuccess = hasSuccess || response.hasSuccess; + hasError = hasError || response.hasError; } })); }