We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2ddb20c commit 1d5ccffCopy full SHA for 1d5ccff
1 file changed
packages/gatsby-image/src/index.js
@@ -189,14 +189,15 @@ class Image extends React.Component {
189
handleRef(ref) {
190
if (this.state.IOSupported && ref) {
191
listenToIntersections(ref, () => {
192
+ const imageInCache = inImageCache(this.props)
193
if (
194
!this.state.isVisible &&
195
typeof this.props.onStartLoad === `function`
196
) {
- this.props.onStartLoad({ wasCached: inImageCache(this.props) })
197
+ this.props.onStartLoad({ wasCached: imageInCache })
198
}
199
- this.setState({ isVisible: true, imgLoaded: false })
200
+ this.setState({ isVisible: true, imgLoaded: imageInCache })
201
})
202
203
0 commit comments