Skip to content

Commit

Permalink
Added comment for svg name/type change
Browse files Browse the repository at this point in the history
  • Loading branch information
Ollyws committed Feb 13, 2023
1 parent 48ab870 commit 2656a14
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/components/AvatarCropModal/AvatarCropModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ const AvatarCropModal = (props) => {
height: size, width: size, originX, originY,
};

// Svg images are converted to a png blob, so we need to update the image name and type accordingly.
const isSvg = props.imageType.includes('image/svg');
const imageName = isSvg ? 'fileName.png' : props.imageName;
const imageType = isSvg ? 'image/png' : props.imageType;
Expand Down

0 comments on commit 2656a14

Please sign in to comment.