BUGFIX: cater for elements without href

This commit is contained in:
Mateusz Uzdowski 2012-05-23 15:53:46 +12:00
parent 29e04a1049
commit bbb08df176

View File

@ -26,8 +26,8 @@
*/
rewriteHashlinks: function() {
$(this).find('ul a').each(function() {
var href = $(this).attr('href').replace(/.*(#.*)/, '$1');
if(href) $(this).attr('href', href);
var href = $(this).attr('href');
if(href) $(this).attr('href', href.replace(/.*(#.*)/, '$1'));
});
}
});