Showing
2 changed files
with
5 additions
and
1 deletions
@@ -117,7 +117,7 @@ $('.info-list .title, .one-good .reco-name').each(function() { | @@ -117,7 +117,7 @@ $('.info-list .title, .one-good .reco-name').each(function() { | ||
117 | }); | 117 | }); |
118 | 118 | ||
119 | //offset.left约等于marginLeft的值则表示介绍被换行,则清除intro的paddingTop让其更靠近头像和作者名 | 119 | //offset.left约等于marginLeft的值则表示介绍被换行,则清除intro的paddingTop让其更靠近头像和作者名 |
120 | -if (parseInt($authorIntro.offset().left, 10) === parseInt($authorIntro.css('margin-left'), 10)) { | 120 | +if ($authorIntro && parseInt($authorIntro.offset().left, 10) === parseInt($authorIntro.css('margin-left'), 10)) { |
121 | $authorIntro.css('padding-top', 0); | 121 | $authorIntro.css('padding-top', 0); |
122 | } | 122 | } |
123 | 123 |
@@ -47,6 +47,10 @@ function setLazyLoadAndMellipsis($infos) { | @@ -47,6 +47,10 @@ function setLazyLoadAndMellipsis($infos) { | ||
47 | * @params $container 逛资讯列表容器 | 47 | * @params $container 逛资讯列表容器 |
48 | */ | 48 | */ |
49 | function initInfosEvt($container) { | 49 | function initInfosEvt($container) { |
50 | + if (typeof $container === 'undefined') { | ||
51 | + return; | ||
52 | + } | ||
53 | + | ||
50 | var cHammer = new Hammer($container[0]); | 54 | var cHammer = new Hammer($container[0]); |
51 | 55 | ||
52 | cHammer.on('tap', function(e) { | 56 | cHammer.on('tap', function(e) { |
-
Please register or login to post a comment