Handle empty torrent list response

This commit is contained in:
John Furrow
2016-06-02 21:06:37 -07:00
parent ced4685163
commit 2d6d696bf4
8 changed files with 73 additions and 10 deletions
+4
View File
@@ -91,6 +91,10 @@ var client = {
request.add('getTorrentList',
{props: clientUtil.defaults.torrentPropertyMethods});
request.postProcess((data) => {
if (!data || data[0][0].length === 0) {
return null;
}
// TODO: Remove this nasty nested array business.
_torrentCollection.updateTorrents(data[0][0]);
_statusCount = _torrentCollection.statusCount;