Skip to content
This repository has been archived by the owner on Jul 28, 2018. It is now read-only.

Commit

Permalink
fix for chrome on iOS 6.1.3
Browse files Browse the repository at this point in the history
In Chrome on iOS 6.1.3, calling Turbolinks.visit will fail because
browserSupportsPushState returns true, but currentState is still null
(because browserIsntBuggy returns false) and thus the cacheCurrentPage
function will fail. This one-line fix ensures that when
Turbolinks.visit is called, if either browserSupportsPushState or
browserIsntBuggy returns false, we fall back to simply setting
document.location.href.
  • Loading branch information
frankshowalter committed Mar 25, 2013
1 parent 11a5340 commit 383900d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
Binary file added .DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion lib/assets/javascripts/turbolinks.js.coffee
Expand Up @@ -8,7 +8,7 @@ requestMethod = document.cookie.match(/request_method=(\w+)/)?[1].toUpperCase()
xhr = null

visit = (url) ->
if browserSupportsPushState
if browserSupportsPushState && browserIsntBuggy
cacheCurrentPage()
reflectNewUrl url
fetchReplacement url
Expand Down

0 comments on commit 383900d

Please sign in to comment.