Permalink
Browse files

Fix links without hrefs breaking

  • Loading branch information...
1 parent 885e10c commit 2c8ae8e8458d4ff68c76c8e124f5aa12f1b5f162 @daleharvey committed Aug 20, 2011
Showing with 8 additions and 6 deletions.
  1. +8 −6 _attachments/js/mobile.futon.js
@@ -17,12 +17,14 @@ $.ajaxSetup({
function makeLinksFast($dom) {
$("a", $dom).each(function() {
- var link = this;
- new google.ui.FastButton(link, function(e) {
- document.location = link.getAttribute('href');
- e.stopPropagation();
- e.preventDefault();
- });
+ var link = $(this).attr('href');
+ if (link) {
+ new google.ui.FastButton(this, function(e) {
+ document.location = link;
+ e.stopPropagation();
+ e.preventDefault();
+ });
+ }
});
}

0 comments on commit 2c8ae8e

Please sign in to comment.