refactor: code improve

This commit is contained in:
katherinehhh 2023-06-25 17:24:14 +08:00
parent 4b50e8f70f
commit c0ea1bdbd7

View File

@ -121,7 +121,7 @@ const InternalRemoteSelect = connect(
[targetField?.uiSchema, fieldNames], [targetField?.uiSchema, fieldNames],
); );
const parseFilter = (rules) => { const parseFilter = (rules) => {
if (!rules) { if (!rules || Object.keys(rules).length === 0) {
return undefined; return undefined;
} }
const type = Object.keys(rules)[0] || '$and'; const type = Object.keys(rules)[0] || '$and';