Skip to content

Commit

Permalink
Merge pull request #35 from aurelia/fix/safari-replaceState-bug
Browse files Browse the repository at this point in the history
fix(history-browser): Add location.href to replaceState() call
  • Loading branch information
davismj authored Feb 20, 2018
2 parents b215008 + 4bf8ebe commit 1c4e1e4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,9 @@ export class BrowserHistory extends History {
*/
setState(key: string, value: any): void {
let state = Object.assign({}, this.history.state);
let { pathname, search, hash } = this.location;
state[key] = value;
this.history.replaceState(state, null, null);
this.history.replaceState(state, null, `${pathname}${search}${hash}`);
}

/**
Expand Down

0 comments on commit 1c4e1e4

Please sign in to comment.