Permalink
Browse files

Don't process links with no href attribute - Fix #345

  • Loading branch information...
1 parent d29a637 commit 9ed5712678b193bc26a0a388f4f519e53dd414d5 @reed reed committed Feb 14, 2014
Showing with 5 additions and 1 deletion.
  1. +4 −0 CHANGELOG.md
  2. +1 −1 lib/assets/javascripts/turbolinks.js.coffee
View
@@ -10,6 +10,10 @@
*Kuba Kuźma*
+* Don't process links with no `href` attribute.
+
+ *Nick Reed*
+
## Turbolinks 2.2.1 (January 30, 2014)
* Do not store redirect_to location in session if the request did not come from Turbolinks. Fixes
@@ -325,7 +325,7 @@ class Click
_extractLink: ->
link = @event.target
link = link.parentNode until !link.parentNode or link.nodeName is 'A'
- @link = new Link(link) if link.nodeName is 'A'
+ @link = new Link(link) if link.nodeName is 'A' and link.href.length isnt 0
_validForTurbolinks: ->
@link? and not (@link.shouldIgnore() or @_nonStandardClick())

0 comments on commit 9ed5712

Please sign in to comment.