Skip to content

Commit

Permalink
fix: ReDoc removes path if site is using history API
Browse files Browse the repository at this point in the history
closes #257
  • Loading branch information
RomanHotsiy committed Apr 23, 2017
1 parent 388b3d4 commit c77e1a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/services/hash.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export class Hash {
update(hash: string|null, rewriteHistory:boolean = false) {
if (hash == undefined) return;
if (rewriteHistory) {
window.history.replaceState(null, '', '#' + hash);
window.history.replaceState(null, '', window.location.href.split("#")[0] + '#' + hash);
return;
}
this.noEmit = true;
Expand Down

0 comments on commit c77e1a2

Please sign in to comment.