Skip to content

Commit

Permalink
Fix 'history' typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Ron Dekker authored and GianlucaGuarini committed Jul 13, 2020
1 parent e60277d commit 711ed95
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/dom.js
Expand Up @@ -13,10 +13,10 @@ const RE_ORIGIN = /^.+?\/\/+[^/]+/

const getWindow = () => typeof window === 'undefined' ? null : window
const getDocument = () => typeof document === 'undefined' ? null : document
const getHistorty = () => getWindow() && history
const getHistory = () => getWindow() && history
const getLocation = () => {
const win = getWindow()
const hist = getHistorty()
const hist = getHistory()

return win && (hist.location || win.location)
}
Expand All @@ -25,7 +25,7 @@ const onWindowEvent = () => router.push(normalizePath(String(getLocation().href)
const onRouterPush = path => {
const url = path.includes(defaults.base) ? path : defaults.base + path
const loc = getLocation()
const hist = getHistorty()
const hist = getHistory()
const doc = getDocument()

// update the browser history only if it's necessary
Expand Down

0 comments on commit 711ed95

Please sign in to comment.