Skip to content

Commit

Permalink
use lodashGet
Browse files Browse the repository at this point in the history
  • Loading branch information
thesahindia committed Sep 15, 2022
1 parent c49c0cc commit d11d824
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/AvatarWithImagePicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ class AvatarWithImagePicker extends React.Component {
* @returns {Boolean}
*/
isValidExtension(image) {
const {fileExtension} = FileUtils.splitExtensionFromFileName(image.name);
const fileExtension = lodashGet(FileUtils.splitExtensionFromFileName(image.name), 'fileExtension', '');
return _.contains(CONST.AVATAR_ALLOWED_EXTENSIONS, fileExtension.toLowerCase());
}

Expand Down

0 comments on commit d11d824

Please sign in to comment.