Skip to content

Commit

Permalink
Merge pull request turbolinks#147 from YasuOza/non_rails_compatible
Browse files Browse the repository at this point in the history
Compatible for non rails environment.
  • Loading branch information
dhh committed Dec 16, 2012
2 parents 00b9971 + dc79217 commit ea5122a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/assets/javascripts/turbolinks.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ reflectNewUrl = (url) ->
window.history.pushState { turbolinks: true, position: currentState.position + 1 }, '', url

reflectRedirectedUrl = (xhr) ->
unless (location = xhr.getResponseHeader 'X-XHR-Current-Location') is document.location.pathname + document.location.search
if (location = xhr.getResponseHeader 'X-XHR-Current-Location') and location isnt document.location.pathname + document.location.search
window.history.replaceState currentState, '', location + document.location.hash

rememberCurrentUrl = ->
Expand Down

0 comments on commit ea5122a

Please sign in to comment.