Skip to content

Commit

Permalink
Display default source if no preview exists (#116)
Browse files Browse the repository at this point in the history
  • Loading branch information
wcandillon committed Jun 22, 2019
1 parent 37d895d commit 4467cee
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "react-native-expo-image-cache",
"version": "4.0.4",
"version": "4.0.5",
"description": "React Native Image Cache and Progressive Loading based on Expo",
"main": "dist/module/index.js",
"react-native": "dist/module/index.js",
Expand Down
4 changes: 1 addition & 3 deletions src/Image.tsx
Expand Up @@ -92,9 +92,7 @@ export default class Image extends React.Component<ImageProps, ImageState> {
];
return (
<View {...{ style }}>
{!!defaultSource && !!preview && !isImageReady && (
<RNImage source={defaultSource} style={computedStyle} {...otherProps} />
)}
{!!defaultSource && !isImageReady && <RNImage source={defaultSource} style={computedStyle} {...otherProps} />}
{!!preview && (
<RNImage
source={preview}
Expand Down

0 comments on commit 4467cee

Please sign in to comment.