Skip to content

Commit

Permalink
Merge pull request #12 from ChristianTucker/master
Browse files Browse the repository at this point in the history
Allow setting the source to a non-cachable image after the previous source was a cacheable image - fix #11
  • Loading branch information
kfiroo committed Feb 22, 2017
2 parents 325b18c + a56a6fc commit 8409f78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CachedImage.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ const CachedImage = React.createClass({
}
const props = getImageProps(this.props);
const style = this.props.style || styles.image;
const source = this.state.cachedImagePath ? {
const source = (this.state.isCacheable && this.state.cachedImagePath) ? {
uri: 'file://' + this.state.cachedImagePath
} : this.props.source;
return this.props.renderImage({
Expand Down

0 comments on commit 8409f78

Please sign in to comment.