Skip to content

Commit

Permalink
Don't ignore trailing '/'.
Browse files Browse the repository at this point in the history
  • Loading branch information
cskr committed Mar 24, 2011
1 parent 186226a commit 5819f9f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions grasshopper/lib/dispatcher.js
Expand Up @@ -87,9 +87,7 @@ exports.dispatch = function(ctx, routeMatcher) {
}

function stripPath(path) {
if(path != '/' && path.match(/\/$/)) {
return path.substring(0, path.length - 1);
} else if(path.match(/\.[^\/]+$/)) {
if(path.match(/\.[^\/]+$/)) {
return path.substring(0, path.lastIndexOf('.'));
} else {
return path;
Expand Down

0 comments on commit 5819f9f

Please sign in to comment.