Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed a hanging response when there are no matches in the debug view

  • Loading branch information...
commit a800823d6c3dbb94ed5f0465092ae8326fd85541 1 parent 7638150
@jhurliman authored
Showing with 3 additions and 1 deletion.
  1. +2 −0  controllers/debug.js
  2. +1 −1  models/mysql.js
View
2  controllers/debug.js
@@ -83,6 +83,8 @@ exports.debugQuery = function(req, res) {
renderView();
}
);
+ } else {
+ renderView();
}
function renderView() {
View
2  models/mysql.js
@@ -42,7 +42,7 @@ function fpQuery(fp, rows, callback) {
'LIMIT ' + rows;
client.query(sql, [], function(err, matches) {
if (err) return callback(err, null);
- if (!matches) return callback(null, []);
+ if (!matches || !matches.length) return callback(null, []);
var trackIDs = new Array(matches.length);
var trackIDMap = {};
Please sign in to comment.
Something went wrong with that request. Please try again.