Skip to content

Commit f59bfe0

Browse files
committed
Merge pull request chrismccord#66 from cj/master
fix turbolink listeners so it works with < IE9
2 parents 4266e0c + bfd1422 commit f59bfe0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

app/assets/javascripts/sync.coffee.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ $ = jQuery
2020

2121
# Handle Turbolinks teardown, unsubscribe from all channels before transition
2222
bindUnsubscribe: ->
23-
document.addEventListener "page:fetch", => @adapter.unsubscribeAll()
24-
document.addEventListener "page:restore", => @reexecuteScripts()
23+
$(document).bind "page:fetch", => @adapter.unsubscribeAll()
24+
$(document).bind "page:restore", => @reexecuteScripts()
2525

2626

2727
# Handle Turbolinks cache restore, re-eval all sync script tags

0 commit comments

Comments
 (0)