fix(utils): 编译条件函数异常兼容

This commit is contained in:
roymondchen 2023-09-14 20:28:05 +08:00
parent 502e59cfd7
commit 7a617d4a17

View File

@ -329,10 +329,10 @@ export const compiledCond = (op: string, fieldValue: any, value: any, range: [nu
if (fieldValue >= range[0] && fieldValue <= range[1]) return false;
break;
case 'include':
if (!fieldValue.includes(value)) return false;
if (typeof fieldValue !== 'undefined' && !fieldValue.includes?.(value)) return false;
break;
case 'not_include':
if (fieldValue.includes(value)) return false;
if (typeof fieldValue !== 'undefined' && fieldValue.includes?.(value)) return false;
break;
default:
break;