diff --git a/module/index/js/index.js b/module/index/js/index.js index d46dab6ee4..aba2977080 100644 --- a/module/index/js/index.js +++ b/module/index/js/index.js @@ -564,7 +564,7 @@ /* The magic number "111" is the space between dropdown trigger btn and the bottom of screen */ var listStyle = {maxHeight: 'initial', top: moreMenuHeight > 111 ? 111 - moreMenuHeight : ''}; - if($list[0].getBoundingClientRect) + if($list[0] && $list[0].getBoundingClientRect) { var btnBounding = $list.prev('a')[0].getBoundingClientRect(); if(btnBounding.height) @@ -803,7 +803,7 @@ $(function() { var val = $searchQuery.val(); var searchType = changeSearchObject(); - if(val !== null && val !== "") + if(val) { var isQuickGo = !reg.test(val); $dropmenu.toggleClass('show-quick-go', isQuickGo);