Skip to content

Commit

Permalink
add support for forceRefresh
Browse files Browse the repository at this point in the history
addresses issue: #95
  • Loading branch information
Patrick Williams committed Oct 14, 2015
1 parent f5292c2 commit 13788b9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions modules/createBrowserHistory.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@ import createDOMHistory from './createDOMHistory'
* Note: In browsers that do not support the HTML5 history API full
* page reloads will be used to preserve URLs.
*/
function createBrowserHistory(options) {
function createBrowserHistory(options={}) {
invariant(
canUseDOM,
'Browser history needs a DOM'
)

let isSupported = supportsHistory()
let { forceRefresh } = options

let isSupported = supportsHistory() && !forceRefresh

function getCurrentLocation(historyState) {
historyState = historyState || window.history.state || {}
Expand Down

0 comments on commit 13788b9

Please sign in to comment.