Skip to content

Commit

Permalink
Fixed path issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Durgaprasad-Budhwani committed Feb 14, 2018
1 parent 36a77cb commit 66db05e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/components/content/gitcontent/readme/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,11 @@ class ReadMeContainer extends PureComponent<Props> {
const query = qs.parse(this.props.location.search);
if (query['?p'] || query.p) {
const pathname = query['?p'] || query.p;
const packageName = pathname.startsWith('/') ? pathname.substr(1, pathname.length) : pathname;
this._getReadMe(packageName);
if (pathname.startsWith('/')) {
this._getReadMe(pathname);
} else {
this._getReadMe(`/${pathname}`);
}
} else {
this._getReadMe(this.props.location.pathname);
}
Expand Down

0 comments on commit 66db05e

Please sign in to comment.