use VarData.__bool__ instead of is None

This commit is contained in:
Masen Furer 2024-10-03 10:07:04 -07:00
parent 0bf6addf44
commit 3237904c5a
No known key found for this signature in database
GPG Key ID: B0008AD22B3B3A95

View File

@ -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))