Skip to content

Commit

Permalink
Fix primefaces#5546: prop type error in console
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware committed Jan 9, 2024
1 parent 574ea88 commit 9d85802
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/lib/accordion/Accordion.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ export const Accordion = React.forwardRef((inProps, ref) => {
};

const isSelected = (index) => {
return props.multiple ? activeIndex && activeIndex.some((i) => i === index) : activeIndex === index;
return props.multiple && Array.isArray(activeIndex) ? activeIndex && activeIndex.some((i) => i === index) : activeIndex === index;
};

React.useImperativeHandle(ref, () => ({
Expand Down

0 comments on commit 9d85802

Please sign in to comment.