From da70dc469cabdb99c4868440ed3670753b5342a3 Mon Sep 17 00:00:00 2001 From: Marcus Nyeholt Date: Wed, 26 Sep 2012 16:27:50 +1000 Subject: [PATCH] BUG Fixed possible reference to null string Hashlink for tabs in the backend didn't check the existence of the href value before trying to .replace it. --- admin/javascript/LeftAndMain.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/admin/javascript/LeftAndMain.js b/admin/javascript/LeftAndMain.js index 3b8310ce9..9dca855bc 100644 --- a/admin/javascript/LeftAndMain.js +++ b/admin/javascript/LeftAndMain.js @@ -945,8 +945,8 @@ jQuery.noConflict(); */ 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')); }); } });