From 5aa2fef289c4549b0cb58e5568cc5369a828eb4b Mon Sep 17 00:00:00 2001 From: YouROK <8yourok8@mail.ru> Date: Wed, 26 May 2021 11:01:11 +0300 Subject: [PATCH] fix to empty list --- server/web/api/torrents.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/web/api/torrents.go b/server/web/api/torrents.go index 079eef2..b15b0d3 100644 --- a/server/web/api/torrents.go +++ b/server/web/api/torrents.go @@ -136,7 +136,7 @@ func remTorrent(req torrReqJS, c *gin.Context) { func listTorrent(req torrReqJS, c *gin.Context) { list := torr.ListTorrent() - if list == nil { + if len(list) == 0 { c.JSON(200, []*state.TorrentStatus{}) return }