From 7ba8ef01c5747b4cbdbfbf3851e9991496e0e7b2 Mon Sep 17 00:00:00 2001 From: Jan Prochazka Date: Sat, 1 Jan 2022 10:54:25 +0100 Subject: [PATCH] true/false in filter is case insensitive --- packages/filterparser/src/parseFilter.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/filterparser/src/parseFilter.ts b/packages/filterparser/src/parseFilter.ts index 2cdfa422..8ebadeb4 100644 --- a/packages/filterparser/src/parseFilter.ts +++ b/packages/filterparser/src/parseFilter.ts @@ -223,8 +223,8 @@ const createParser = (filterType: FilterType) => { null: () => word('NULL').map(unaryCondition('isNull')), empty: () => word('EMPTY').map(unaryCondition('isEmpty')), notEmpty: r => r.not.then(r.empty).map(unaryCondition('isNotEmpty')), - true: () => word('TRUE').map(binaryFixedValueCondition(1)), - false: () => word('FALSE').map(binaryFixedValueCondition(0)), + true: () => P.regexp(/true/i).map(binaryFixedValueCondition(1)), + false: () => P.regexp(/false/i).map(binaryFixedValueCondition(0)), trueNum: () => word('1').map(binaryFixedValueCondition(1)), falseNum: () => word('0').map(binaryFixedValueCondition(0)),