Skip to content

Commit

Permalink
Bumps to v0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
arqex committed Jul 12, 2018
1 parent d108621 commit c930c83
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 5 deletions.
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## v0.4.0
* Normalize pathnames to make it work with IE

## v0.3.0
* Adds the `refresh` method
* Updates matching order to give preference to child root routes
Expand Down
8 changes: 7 additions & 1 deletion dist/urlhub.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,11 @@ return /******/ (function(modules) { // webpackBootstrap
var parsed = parseUrl( url );
path = parsed.pathname;

// Normalize pathname
if( path[0] !== '/' ){
path = '/' + path;
}

while( i < candidates.length && !found ){
c = candidates[i];
if( c.childRegex ){
Expand All @@ -191,7 +196,7 @@ return /******/ (function(modules) { // webpackBootstrap
}
}
}

found = c.regex.exec( path );
if( found ){
found = {
Expand Down Expand Up @@ -224,6 +229,7 @@ return /******/ (function(modules) { // webpackBootstrap
c.params.forEach( function( p, i ){
match.params[ p ] = found.params[i];
});

return match;
},

Expand Down
2 changes: 1 addition & 1 deletion dist/urlhub.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "urlhub",
"version": "0.3.0",
"version": "0.4.0",
"description": "Another router library, yet the simplest one.",
"main": "urlhub.js",
"scripts": {
Expand All @@ -14,7 +14,7 @@
},
"license": "MIT",
"dependencies": {
"mini-querystring": "^1.0.2",
"mini-querystring": "^2.0.6",
"path-to-regexp": "^1.7.0"
},
"repository": {
Expand Down
Loading

0 comments on commit c930c83

Please sign in to comment.