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 }