Skip to content

Commit

Permalink
prevent conflict with #2670
Browse files Browse the repository at this point in the history
  • Loading branch information
benedikt-bartscher committed Feb 27, 2024
1 parent a4a6ef4 commit 69f73ae
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions reflex/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -1619,6 +1619,9 @@ def dict(
base_vars = {
prop_name: self.get_value(getattr(self, prop_name), include=self.base_vars[prop_name]._var_used_attributes) # type: ignore[call-arg]
for prop_name in self.base_vars
if self.base_vars[prop_name]._var_is_used
or prop_name == constants.ROUTER
or prop_name == constants.CompileVars.IS_HYDRATED
}
if initial:
computed_vars = {
Expand All @@ -1628,13 +1631,18 @@ def dict(
and not isinstance(cv._initial_value, types.Unset)
else self.get_value(getattr(self, prop_name), include=self.computed_vars[prop_name]._var_used_attributes) # type: ignore[call-arg]
for prop_name, cv in self.computed_vars.items()
if self.computed_vars[prop_name]._var_is_used
}
elif include_computed:
computed_vars = {
# Include the computed vars.
prop_name: self.get_value(getattr(self, prop_name), include=self.computed_vars[prop_name]._var_used_attributes) # type: ignore[call-arg]
for prop_name in self.computed_vars
if self.computed_vars[prop_name]._var_is_used
}
else:
computed_vars = {}

variables = {**base_vars, **computed_vars}

d = {
Expand Down

0 comments on commit 69f73ae

Please sign in to comment.