fix(util): 条件编译对应is与not实现对应value为false的情况出错

This commit is contained in:
roymondchen 2023-11-23 14:51:52 +08:00
parent 4bbde1a5f6
commit 33c8f8bf5a

View File

@ -299,10 +299,10 @@ export const compiledNode = (
export const compiledCond = (op: string, fieldValue: any, value: any, range: [number, number]): boolean => {
switch (op) {
case 'is':
if (!fieldValue) return false;
if (fieldValue !== value) return false;
break;
case 'not':
if (fieldValue) return false;
if (fieldValue === value) return false;
break;
case '=':
if (fieldValue !== value) return false;