mirror of
https://github.com/directus/directus.git
synced 2026-01-28 18:57:56 -05:00
Prevent boolean as string when switching filter (#12597)
This commit is contained in:
@@ -273,7 +273,12 @@ function updateComparator(index: number, operator: keyof FieldFilterOperator) {
|
||||
}
|
||||
break;
|
||||
default:
|
||||
update(Array.isArray(value) ? value[0] : value);
|
||||
// avoid setting value as string 'true'/'false' when switching from null/empty operators
|
||||
if (['_null', '_nnull', '_empty', '_nempty'].includes(nodeInfo.comparator)) {
|
||||
update(null);
|
||||
} else {
|
||||
update(Array.isArray(value) ? value[0] : value);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user