Skip to content

Commit 13a6e12

Browse files
Added check for options on dropdown (#52)
Co-authored-by: LennartSchmidtKern <[email protected]>
1 parent fb91c6b commit 13a6e12

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/KernDropdown.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { MemoIconChevronDown, MemoIconDotsVertical, MemoIconExternalLink, MemoIc
1414
const DEFAULTS = { fontSizeClass: 'text-xs' };
1515

1616
export default function KernDropdown(props: KernDropdownProps) {
17-
const isDisabled = props.disabled || props.options.length == 0;
17+
const isDisabled = props.disabled || (props.options && props.options.length == 0);
1818

1919
const [dropdownCaptions, setDropdownCaptions] = useState<any[]>([]);
2020
const [disabledOptions, setDisabledOptions] = useState<boolean[]>([]);

0 commit comments

Comments
 (0)