Skip to content

Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.

fix ts type

Oleg Isonencb4940d13729
diff --git a/app/shared/design-system/components/select.stories.tsx b/app/shared/design-system/components/select.stories.tsx
index 030ff9232c..19c91f8c18 100644
--- a/app/shared/design-system/components/select.stories.tsx
+++ b/app/shared/design-system/components/select.stories.tsx
@@ -47,7 +47,9 @@ export const WithComplexItems: ComponentStory<typeof Select> = () => {
const options = Object.keys(items);
const [value, setValue] = React.useState(options[0]);
const getLabel = (option: SelectOption) =>
- value ? `${items[option]?.icon} ${option}` : "No fruit selected";
+ value && option in items
+ ? `${items[option as keyof typeof items]?.icon} ${option}`
+ : "No fruit selected";
return (
<Select
name="fruit"