Showing
2 changed files
with
6 additions
and
6 deletions
@@ -267,12 +267,13 @@ Page(Object.assign({ | @@ -267,12 +267,13 @@ Page(Object.assign({ | ||
267 | }) | 267 | }) |
268 | setTimeout(function () { | 268 | setTimeout(function () { |
269 | wx.createSelectorQuery().select('.code-list-item-container').boundingClientRect().exec((r) => { | 269 | wx.createSelectorQuery().select('.code-list-item-container').boundingClientRect().exec((r) => { |
270 | - animation.height(r[0].height - 65 * sys.screenWidth / 375).step(); | ||
271 | - this.setData({ | ||
272 | - animation: animation.export() | ||
273 | - }) | 270 | + if (r && r[0] && r[0].height) { |
271 | + animation.height(r[0].height - 65 * sys.screenWidth / 375).step(); | ||
272 | + this.setData({ | ||
273 | + animation: animation.export() | ||
274 | + }); | ||
275 | + } | ||
274 | }) | 276 | }) |
275 | - | ||
276 | }.bind(this), 800); | 277 | }.bind(this), 800); |
277 | } | 278 | } |
278 | }); | 279 | }); |
-
Please register or login to post a comment