diff --git a/db.js b/db.js index 771b25d..03e9d38 100644 --- a/db.js +++ b/db.js @@ -159,7 +159,7 @@ class DB { const {err, rows} = await this.ormSelect(tblName, whereList); return { 'err': err, - 'row': rows.length > 0 ? rows[0] : null + 'row': rows && rows.length > 0 ? rows[0] : null }; }