Authored by 徐炜

Merge branch 'hotfix/cate' into 'master'

右侧空白点击跳转修复



See merge request !11
@@ -16,8 +16,9 @@ var $nav = $('.category-nav'), @@ -16,8 +16,9 @@ var $nav = $('.category-nav'),
16 require('../common'); 16 require('../common');
17 17
18 function resetHeight() { 18 function resetHeight() {
19 - var h = document.body.scrollHeight - $search.outerHeight() - $nav.outerHeight();  
20 - $contents.height(h); 19 + var h = document.body.scrollHeight - $search.outerHeight() - $nav.outerHeight();
  20 +
  21 + $contents.height(h);
21 } 22 }
22 resetHeight(); 23 resetHeight();
23 24
@@ -73,7 +74,7 @@ $categoryContainer.on('touchend', function(e) { @@ -73,7 +74,7 @@ $categoryContainer.on('touchend', function(e) {
73 $subLevel.eq(index).removeClass('hide'); 74 $subLevel.eq(index).removeClass('hide');
74 } 75 }
75 76
76 - if ($this.find('a').attr('href')) { 77 + if ($this[0] && $this[0].tagName === 'LI' && $this.find('a').attr('href')) {
77 location.href = $this.find('a').attr('href'); 78 location.href = $this.find('a').attr('href');
78 } 79 }
79 }); 80 });