reflex-dev / reflex

🕸️ Web apps in pure Python 🐍
https://reflex.dev
Apache License 2.0
20.46k stars 1.18k forks source link

[ENG-4098] Deconfuse key/value of State.get_value / dict / get_delta #4371

Closed masenf closed 2 weeks ago

masenf commented 2 weeks ago

Because of some dodgy logic in Base.get_value and State.dict / State.get_delta when the value of some state var X happened to be the name of another var in the state Y, then the value for X would be returned as the value of Y.

wat.

Fixes #4369

linear[bot] commented 2 weeks ago

ENG-4098 Variable-Name/String Collision Causes Unintended Variable Replacement