From 3237904c5afbbc90094df92db3a431abc30e3da5 Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Thu, 3 Oct 2024 10:07:04 -0700 Subject: [PATCH] use VarData.__bool__ instead of `is None` --- reflex/event.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reflex/event.py b/reflex/event.py index a059e7a47..9b54eddeb 100644 --- a/reflex/event.py +++ b/reflex/event.py @@ -845,7 +845,7 @@ def call_script( LiteralVar.create(javascript_code), javascript_code, ) - if javascript_code._get_all_var_data() is None: + if not javascript_code._get_all_var_data(): # Without VarData, cast to string and eval the code in the event loop. javascript_code = str(Var(_js_expr=original_code))