updates to stop it breaking with an empty table
This commit is contained in:
parent
fa8e7bb26d
commit
17435af10a
@ -138,7 +138,7 @@ router.get('/list', function (req, res) {
|
||||
|
||||
var out = [];
|
||||
|
||||
if (rows !== null && rows.length > 0) {
|
||||
if (rows !== null && typeof rows !== 'undefined') {
|
||||
// logger.debug(err);
|
||||
// logger.debug(rows);
|
||||
rows.forEach(function (row) {
|
||||
@ -165,7 +165,7 @@ router.get('/entry/:id', function (req, res) {
|
||||
var out = [];
|
||||
// logger.debug(err);
|
||||
// logger.debug(rows);
|
||||
if (rows !== null && rows.length > 0)
|
||||
if (rows !== null && typeof rows !== 'undefined') {
|
||||
{
|
||||
rows.forEach(function (row) {
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user