refactor: fix potential issues when converting to string [no ci]

This commit is contained in:
Aman Harwara
2023-07-31 16:29:46 +05:30
parent f24e0b0e50
commit 661fddf433
3 changed files with 4 additions and 4 deletions

View File

@@ -75,7 +75,7 @@ const CompoundPredicateBuilder = ({ controller }: Props) => {
{predicate.keypath && (
<PredicateValue
keypath={predicate.keypath as PredicateKeypath}
value={predicate.value.toString()}
value={typeof predicate.value !== 'string' ? JSON.stringify(predicate.value) : predicate.value}
setValue={(value: string) => {
setPredicate(index, { value })
}}