Skip to content
Permalink
Browse files Browse the repository at this point in the history
Follow up to ff02114 to ensure req.path is good and stringy.
  • Loading branch information
mikermcneil committed Sep 23, 2018
1 parent 4f78b79 commit 0533a48
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/receive-incoming-sails-io-msg.js
Expand Up @@ -106,7 +106,10 @@ module.exports = function ToReceiveIncomingSailsIOMsg(app) {

url : options.incomingSailsIOMsg.url,

path : url.parse(options.incomingSailsIOMsg.url).pathname,
path : url.parse(options.incomingSailsIOMsg.url).pathname || '/',
// ^^ Uses || '/' because otherwise url.parse returns `null`,
// which is not a string and thus bad when you try to check
// .match() of it.

method : options.eventName,

Expand Down

0 comments on commit 0533a48

Please sign in to comment.