From 024df62f3104ef47877d92b15b29d89b9e4439e6 Mon Sep 17 00:00:00 2001 From: Jesse Chan Date: Tue, 16 Mar 2021 22:48:01 +0800 Subject: [PATCH] server: rTorrent: fix boolean response transformation in moveTorrents Bug: #246 --- server/services/rTorrent/clientGatewayService.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/services/rTorrent/clientGatewayService.ts b/server/services/rTorrent/clientGatewayService.ts index 226e44ab..14f3f072 100644 --- a/server/services/rTorrent/clientGatewayService.ts +++ b/server/services/rTorrent/clientGatewayService.ts @@ -310,8 +310,8 @@ class RTorrentClientGatewayService extends ClientGatewayService { }), ]) .then(this.processClientRequestSuccess, this.processRTorrentRequestError) - .then((responses: string[][]) => - responses.map((response) => (typeof response === 'number' ? response : response?.[0])), + .then((responses: string[][]): boolean[] => + responses.map((response) => (typeof response === 'number' ? response !== 0 : response?.[0] !== '0')), ) .catch(() => undefined);