From 8c0a50db3b36441c0e0f3b0ab5b63f2806349313 Mon Sep 17 00:00:00 2001 From: Jack Moore Date: Tue, 8 Nov 2016 15:34:24 -0500 Subject: [PATCH] Removed superstitious condition Params will only ever be an empty object, because the enroute function always passes an empty object and the only way match is invoked is through enroute. IMO, it would be better form for match to return a param object that it defines rather than mutating a parameter. --- index.js | 1 - 1 file changed, 1 deletion(-) diff --git a/index.js b/index.js index 7c62c26..863c22b 100644 --- a/index.js +++ b/index.js @@ -54,7 +54,6 @@ function match(path, params, pathname) { var m = regexp.exec(pathname); if (!m) return false; - else if (!params) return true; for (var i = 1, len = m.length; i < len; ++i) { var key = keys[i - 1];