mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUGFIX: cater for elements without href
This commit is contained in:
parent
29e04a1049
commit
bbb08df176
@ -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'));
|
||||
});
|
||||
}
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user