Review fixes
This commit is contained in:
@@ -6,10 +6,12 @@ export const findMatchingOption = (value, options, defaultValue) => {
|
||||
};
|
||||
|
||||
export const findCompanySizeMatch = (options, size) => {
|
||||
if (!size) return undefined;
|
||||
if (Number.isNaN(size)) return undefined;
|
||||
return (
|
||||
options.find(option => {
|
||||
const upperLimit = option.value.split('-')[1]?.split('+')[0];
|
||||
return size < (upperLimit ? Number(upperLimit) : Infinity);
|
||||
})?.value || this.companySizeOptions[0].value
|
||||
})?.value || options[0].value
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user