catch error if no torrents are in the DB - seedlinux - Torrent indexing tool opensource torrents with share ratio's etc.
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
       ---
 (DIR) commit 822f48597fe37b14645e5c936e133620a16ffd56
 (DIR) parent c8ec4202dff0fc6092abe1e4c387adf0d4655801
 (HTM) Author: Jay Scott <me@jay.scot>
       Date:   Fri, 30 Jun 2017 11:26:56 +0100
       
       catch error if no torrents are in the DB
       
       Diffstat:
         M controllers/torrents_controller.js  |       4 ++++
       
       1 file changed, 4 insertions(+), 0 deletions(-)
       ---
 (DIR) diff --git a/controllers/torrents_controller.js b/controllers/torrents_controller.js
       @@ -13,6 +13,10 @@ exports.index = function(req, res) {
                    Torrent.find({},callback);
                },
            }, function(err, results) {
       +        if(!results) {
       +          console.log(results.torrent_count);
       +          results.torrent_count == 0;
       +        }
                res.render('torrent', { title: 'Index Page', error: err, data: results });
            });
        };