Skip to content

Commit

Permalink
ensure base path does not contain a trailing slash
Browse files Browse the repository at this point in the history
  • Loading branch information
Carmine DiMascio committed Apr 20, 2019
1 parent fceb57f commit cfcebf8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/framework/base.path.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ export default class BasePath {
if (startPathIdx === -1) return '/';

const pathIdx = startPathIdx + startSearchIdx;
return u.substring(pathIdx);
// extract path portion of url and remove trailing slash if one exists
return u.replace(/\/$/, '').substring(pathIdx);
}
}

Expand Down

0 comments on commit cfcebf8

Please sign in to comment.