diff --git a/lib/utils/filterSelectValues.js b/lib/utils/filterSelectValues.js index f69a11bd..95def34a 100644 --- a/lib/utils/filterSelectValues.js +++ b/lib/utils/filterSelectValues.js @@ -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); };