mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-11 04:52:36 +10:00
Merge pull request #1909 from DemaPy/patch-1
fix(client): fix Type Error in Picture Configuration Options
This commit is contained in:
@ -52,6 +52,7 @@ export const PictureOptions = () => {
|
|||||||
}, [picture.aspectRatio]);
|
}, [picture.aspectRatio]);
|
||||||
|
|
||||||
const onAspectRatioChange = (value: AspectRatio) => {
|
const onAspectRatioChange = (value: AspectRatio) => {
|
||||||
|
if (!value) return
|
||||||
setValue("basics.picture.aspectRatio", stringToRatioMap[value]);
|
setValue("basics.picture.aspectRatio", stringToRatioMap[value]);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -117,6 +118,8 @@ export const PictureOptions = () => {
|
|||||||
id="picture.aspectRatio"
|
id="picture.aspectRatio"
|
||||||
value={picture.aspectRatio}
|
value={picture.aspectRatio}
|
||||||
onChange={(event) => {
|
onChange={(event) => {
|
||||||
|
if (!event.target.valueAsNumber) return
|
||||||
|
if (isNaN(event.target.valueAsNumber)) return
|
||||||
setValue("basics.picture.aspectRatio", event.target.valueAsNumber);
|
setValue("basics.picture.aspectRatio", event.target.valueAsNumber);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user