Skip to content

Commit

Permalink
fix(components): 修复 Image 组件在 react 环境下报错的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
luckyadam committed Jan 7, 2020
1 parent 4254c81 commit e7ad2b8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/taro-components/src/components/image/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class Image extends Nerv.Component {
// 异步 api 关系
if (entries[entries.length - 1].isIntersecting) {
this.setState({ isLoaded: true }, () => {
this.observer.unobserve(this.imgRef)
Nerv.findDOMNode(this).children[0].src = this.props.src
})
}
Expand Down

0 comments on commit e7ad2b8

Please sign in to comment.