pass through emit args to updateHistory (#496)
This commit is contained in:
committed by
Yoshua Wuyts
parent
eec8f756ec
commit
9708859894
@@ -58,7 +58,7 @@ function Choo (opts) {
|
|||||||
bus.prependListener('pushState', updateHistory.bind(null, 'push'))
|
bus.prependListener('pushState', updateHistory.bind(null, 'push'))
|
||||||
bus.prependListener('replaceState', updateHistory.bind(null, 'replace'))
|
bus.prependListener('replaceState', updateHistory.bind(null, 'replace'))
|
||||||
|
|
||||||
function updateHistory (mode) {
|
function updateHistory (mode, href) {
|
||||||
if (href) window.history[mode + 'State']({}, null, href)
|
if (href) window.history[mode + 'State']({}, null, href)
|
||||||
bus.emit('render')
|
bus.emit('render')
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
|
|||||||
Reference in New Issue
Block a user