Skip to content

Commit

Permalink
add support for a forceRefresh option for createBrowserHistory
Browse files Browse the repository at this point in the history
  • Loading branch information
pwmckenna committed Oct 14, 2015
1 parent f5292c2 commit bc1d93d
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 bc1d93d

Please sign in to comment.