Skip to content

Commit e3b4105

Browse files
authored
Merge pull request #1909 from DemaPy/patch-1
fix(client): fix Type Error in Picture Configuration Options
2 parents f0ede57 + 2409a57 commit e3b4105

File tree

1 file changed

+3
-0
lines changed
  • apps/client/src/pages/builder/sidebars/left/sections/picture

1 file changed

+3
-0
lines changed

apps/client/src/pages/builder/sidebars/left/sections/picture/options.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ export const PictureOptions = () => {
5252
}, [picture.aspectRatio]);
5353

5454
const onAspectRatioChange = (value: AspectRatio) => {
55+
if (!value) return
5556
setValue("basics.picture.aspectRatio", stringToRatioMap[value]);
5657
};
5758

@@ -117,6 +118,8 @@ export const PictureOptions = () => {
117118
id="picture.aspectRatio"
118119
value={picture.aspectRatio}
119120
onChange={(event) => {
121+
if (!event.target.valueAsNumber) return
122+
if (isNaN(event.target.valueAsNumber)) return
120123
setValue("basics.picture.aspectRatio", event.target.valueAsNumber);
121124
}}
122125
/>

0 commit comments

Comments
 (0)