Skip to content
This repository has been archived by the owner on Jun 10, 2021. It is now read-only.

Commit

Permalink
#! fix for undefined urls in IE 11 and edge browsers when calling rep…
Browse files Browse the repository at this point in the history
…lace/push state with undefined url value
  • Loading branch information
jsimck committed Nov 20, 2018
1 parent 5552f1d commit 8cd8f86
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions window/ClientWindow.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ export default class ClientWindow extends Window {
/**
* @inheritdoc
*/
pushState(state, title, url) {
pushState(state, title, url = null) {
if (window.history.pushState) {
window.history.pushState(state, title, url);
}
Expand All @@ -186,7 +186,7 @@ export default class ClientWindow extends Window {
/**
* @inheritdoc
*/
replaceState(state, title, url) {
replaceState(state, title, url = null) {
if (window.history.replaceState) {
window.history.replaceState(state, title, url);
}
Expand Down
2 changes: 1 addition & 1 deletion window/Window.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ export default class Window {
* history item, preferably representing the page state.
* @param {string} title The page title related to the state. Note that
* this parameter is ignored by some browsers.
* @param {string} url The new URL at which the state is available.
* @param {string=} [url=null] The new URL at which the state is available.
*/
replaceState() {}

Expand Down

0 comments on commit 8cd8f86

Please sign in to comment.