Do not fetch image if file.id is not present (#2165)

This commit is contained in:
Elias Nahum 2018-09-26 11:26:35 -03:00 committed by Harrison Healey
parent 4f120fed5d
commit e6c37e5e69

View file

@ -115,7 +115,7 @@ export default class FileAttachmentImage extends PureComponent {
const imageProps = {};
if (file.localPath) {
imageProps.defaultSource = {uri: file.localPath};
} else {
} else if (file.id) {
imageProps.thumbnailUri = Client4.getFileThumbnailUrl(file.id);
imageProps.imageUri = Client4.getFilePreviewUrl(file.id);
}