Skip to content
Browse files

work-around query() sometimes returning undefined

  • Loading branch information...
1 parent 4aa3e1e commit f8ed58bd68df96e81117959c6439ea6790b6cf2f @substack committed Aug 1, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 index.js
  2. +1 −1 package.json
View
2 index.js
@@ -64,7 +64,7 @@ function handler (ports, opts, req, bounce) {
req.on('error', function () { req.socket.destroy() });
req.socket.on('error', function () { req.socket.destroy() });
- var ps = ports.query(opts.prefix + '.' + host);
+ var ps = ports.query(opts.prefix + '.' + host) || [];
var mounts = ps.filter(function (p) {
if (typeof p.mount !== 'string') return false;
View
2 package.json
@@ -1,6 +1,6 @@
{
"name" : "mountie",
- "version" : "0.0.0",
+ "version" : "0.0.1",
"description" : "compose web servers behind host headers and mount paths",
"main" : "index.js",
"bin" : {},

0 comments on commit f8ed58b

Please sign in to comment.
Something went wrong with that request. Please try again.