pass through emit args to updateHistory (#496)

This commit is contained in:
Kasper Lewau
2017-05-20 18:52:18 +02:00
committed by Yoshua Wuyts
parent eec8f756ec
commit 9708859894
+1 -1
View File
@@ -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 () {