Skip to content

Commit

Permalink
Fixed primefaces#2749 - If the item's className option is null, Dropd…
Browse files Browse the repository at this point in the history
…own will throw a JS exception.
  • Loading branch information
mertsincan committed Apr 13, 2022
1 parent b746747 commit a969a62
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/lib/dropdown/DropdownItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const DropdownItem = React.memo((props) => {
'p-highlight': props.selected,
'p-disabled': props.disabled,
'p-dropdown-item-empty': (!props.label || props.label.length === 0)
}, props.option.className);
}, props.option && props.option.className);
const content = props.template ? ObjectUtils.getJSXElement(props.template, props.option) : props.label;

return (
Expand Down

0 comments on commit a969a62

Please sign in to comment.