Skip to content

Commit

Permalink
remove .bool
Browse files Browse the repository at this point in the history
  • Loading branch information
adhami3310 committed Nov 15, 2024
1 parent eac54d6 commit 7f1dc7c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion reflex/vars/sequence.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,11 @@ def string_contains_field_operation(
The string contains operation.
"""
return var_operation_return(
js_expression=f"{field.bool()} ? {haystack}.some(obj => obj[{field}] === {needle}) : {haystack}.some(obj => obj === {needle})",
js_expression=f"isTrue({field}) ? {haystack}.some(obj => obj[{field}] === {needle}) : {haystack}.some(obj => obj === {needle})",
var_type=bool,
var_data=VarData(
imports=_IS_TRUE_IMPORT,
),
)


Expand Down

0 comments on commit 7f1dc7c

Please sign in to comment.