Comparing version 2.0.1 to 2.0.2
# Change Log | ||
## 2.0.1 | ||
* [#35] Fix decodeURIComponent of undefined bug | ||
## 2.0.0 | ||
@@ -4,0 +8,0 @@ |
@@ -93,18 +93,16 @@ /** | ||
// remove query string and hash fragment from url | ||
var pos = url.indexOf('?'); | ||
var path; | ||
if (pos >= 0) { | ||
// remove query string | ||
path = url.substring(0, pos); | ||
} else { | ||
pos = url.indexOf('#'); | ||
// | ||
// hash fragment does not get sent to server. | ||
// But since routr can be used on both server and client, | ||
// we should remove hash fragment before matching the regex. | ||
var path = url; | ||
var pos; | ||
// Leave `pos` at the beginning of the query-string, if any. | ||
['#', '?'].forEach(function(delimiter){ | ||
pos = path.indexOf(delimiter); | ||
if (pos >= 0) { | ||
// hash fragment does not get sent to server. | ||
// But since routr can be used on both server and client, | ||
// we should remove hash fragment before matching the regex. | ||
path = url.substring(0, pos); | ||
} else { | ||
path = url; | ||
path = path.substring(0, pos); | ||
} | ||
} | ||
}); | ||
@@ -111,0 +109,0 @@ var pathMatches = self.regexp.exec(path); |
{ | ||
"name": "routr", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "A router for both server and client", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
21469
0
274