Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions components/Parameters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,12 @@ const Parameters: React.FC<{ parameters: ParametersArray }> = ({ parameters }) =
const parameterName = Object.keys(parameter)[0].toLowerCase();
const detail = Object.values(parameter)[0];

// Ensure detail.components is defined and is an array before calling includes.
const isComponentMatch = selectedComponent ? (Array.isArray(detail.components) && detail.components.includes(selectedComponent)) : true;
const isComponentMatch =
selectedComponent ?
(
detail.components.includes(selectedComponent)
|| detail.components[0] === "*"
) : true;
return parameterName.includes(searchLower) && isComponentMatch;
});
}, [searchValue, parameters, selectedComponent]);
Expand Down