From 820875595b950ee89a81581f9d4a4d7ff97c4b62 Mon Sep 17 00:00:00 2001 From: Argo-Lenovo Date: Thu, 22 Dec 2016 22:08:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9BUG=EF=BC=9A=E6=9C=AA?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E5=88=B0=E8=8F=9C=E5=8D=95=E7=9A=84=E7=BD=91?= =?UTF-8?q?=E9=A1=B5arch.offset()=E4=B8=BAundefined=E8=84=9A=E6=9C=AC?= =?UTF-8?q?=E5=87=BA=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bootstrap.Admin/Content/js/common-scripts.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Bootstrap.Admin/Content/js/common-scripts.js b/Bootstrap.Admin/Content/js/common-scripts.js index ebd2da84..6deee211 100644 --- a/Bootstrap.Admin/Content/js/common-scripts.js +++ b/Bootstrap.Admin/Content/js/common-scripts.js @@ -59,8 +59,8 @@ $(function () { // breadcrumb var arch = $('#nav-accordion').find('a.active').last(); - $breadNav.text(arch.text()); - var top = arch.offset().top; + $breadNav.text(arch.text() || $('title').text()); + var top = (arch.offset() || { top: 0 }).top; if (top > 0) { var middle = $('header').outerHeight() + $sidebar.outerHeight() / 2; if (top > middle) $sidebar.animate({ scrollTop: top + arch.outerHeight() / 2 - middle }, 500);