Skip to content

Commit

Permalink
dev: PhotoUtils: gracefully handle undefined images
Browse files Browse the repository at this point in the history
  • Loading branch information
kaloudis committed Jan 29, 2025
1 parent e3c8482 commit 8a09915
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/PhotoUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const getPhoto = (photo: string | undefined): string => {
if (fileName === 'cln') file = CLN;
if (fileName === 'lnd') file = LND;

return Image.resolveAssetSource(file).uri || '';
return Image.resolveAssetSource(file)?.uri || '';
}
return photo || '';
};
Expand Down

0 comments on commit 8a09915

Please sign in to comment.