diff --git a/src/utils/tpl-builtin.ts b/src/utils/tpl-builtin.ts index 052c8196b..47f833384 100644 --- a/src/utils/tpl-builtin.ts +++ b/src/utils/tpl-builtin.ts @@ -242,11 +242,11 @@ export const filters: { arg1 = arg1 ? getStrOrVariable(arg1, this) : ''; fn = value => arg1 == value; } else if (directive === 'isIn') { - let list:Array = arg1 ? getStrOrVariable(arg1, this) : []; + let list: Array = arg1 ? getStrOrVariable(arg1, this) : []; list = Array.isArray(list) ? list : []; fn = value => !!~list.indexOf(value); } else if (directive === 'notIn') { - let list:Array = arg1 ? getStrOrVariable(arg1, this) : []; + let list: Array = arg1 ? getStrOrVariable(arg1, this) : []; list = Array.isArray(list) ? list : []; fn = value => !~list.indexOf(value); } else { @@ -364,7 +364,7 @@ function getStrOrVariable(value: string, data: any) { ? parseFloat(value) : /,/.test(value) ? value.split(/\s*,\s*/) - : (resolveVariable(value, data) ?? value); + : resolveVariable(value, data); } function getConditionValue(