Check for deleted menus or something. It fixes a JS error. props koopersmith, see #13215.

git-svn-id: https://develop.svn.wordpress.org/trunk@14394 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2010-05-03 19:35:54 +00:00
parent 2f0d602eeb
commit 80ee3d1d2d
1 changed files with 4 additions and 3 deletions

View File

@ -409,9 +409,10 @@ var WPNavMenuHandler = function ($) {
$.fn.extend({
makeTabVisible : function() {
var t = this.eq(0),
left = t.offset().left,
right = left + t.outerWidth();
var t = this.eq(0), left, right;
if( ! t.length ) return;
left = t.offset().left;
right = left + t.outerWidth();
if( right > fixedRight )
fluid.animate({ 'margin-left' : "+=" + (fixedRight - right) + 'px', }, 'fast');
else if ( left < fixedLeft )