Skip to content

Commit

Permalink
Use .default if available (#2673)
Browse files Browse the repository at this point in the history
  • Loading branch information
sahariko authored Dec 23, 2024
1 parent 9370738 commit c032fec
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/core/src/components/Dropdown/Dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,10 @@ const Dropdown: VibeComponent<DropdownComponentProps, HTMLElement> & {
}
};

const DropDownComponent: React.ElementType = asyncOptions ? AsyncSelect : Select;
let DropDownComponent: React.ElementType = asyncOptions ? AsyncSelect : Select;

// @ts-expect-error - We need to check if the default export is available
DropDownComponent = DropDownComponent.default || DropDownComponent;

const asyncAdditions = {
...(asyncOptions && {
Expand Down

0 comments on commit c032fec

Please sign in to comment.