diff --git a/src/components/common/VnSelect.vue b/src/components/common/VnSelect.vue index cd5608954..aa629767d 100644 --- a/src/components/common/VnSelect.vue +++ b/src/components/common/VnSelect.vue @@ -183,8 +183,7 @@ async function fetchFilter(val) { }, {}); } else defaultWhere = { [key]: getVal(val) }; const where = { ...(val ? defaultWhere : {}), ...$props.where }; - if (typeof $props.exprBuilder === 'function') - Object.assign(where, $props.exprBuilder(key, val)); + $props.exprBuilder && Object.assign(where, $props.exprBuilder(key, val)); const fetchOptions = { where, include, limit }; if (fields) fetchOptions.fields = fields; if (sortBy) fetchOptions.order = sortBy;