Filter dataset using le()

I’m trying to filter a dataset of rooms based on their capacity:

https://www.cohatch.com/meeting-rooms

Why is this code not working:

function addConditionIfDropdownSelected(filter, dropdownId, fieldKey) {
const value = $w(‘#’ + dropdownId).value
if (value) {
return filter.contains(fieldKey, value)
}
return filter
}

async function productFilter() {
let filter = wixData.filter()
filter = addConditionIfDropdownSelected(filter, ‘dropdown2’, ‘capacity’)
$w(‘#dataset1’).setFilter(filter)
}

export function dropdown2_change(event) {
productFilter();
}