Skip to content

Commit

Permalink
fix: search is not a function issue
Browse files Browse the repository at this point in the history
  • Loading branch information
alisher-epam committed Aug 23, 2024
1 parent 88d54ed commit 253ff78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/utils/filterSelectValues.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ import { escapeRegExp } from 'lodash';
export const filterSelectValues = (value, dataOptions) => {
const regex = new RegExp(escapeRegExp(value), 'i');

return dataOptions.filter(({ label }) => label.search(regex) !== -1);
return dataOptions.filter(({ label }) => label.search?.(regex) !== -1);
};

0 comments on commit 253ff78

Please sign in to comment.