cmu-delphi / forecast-eval

delphi.cmu.edu/forecast-eval
MIT License
5 stars 2 forks source link

Move `PREV_TARGET` to session-specific global to not leak behavior between users #267

Closed nmdefries closed 1 year ago

nmdefries commented 1 year ago

The PREV_TARGET variable was defined as a Shiny-wide global constant such that it could be shared between user sessions. However, each user session modifies PREV_TARGET out of its own environment with <<- which means the constant is changing for other users! Move PREV_TARGET to be defined in the beginning of the server function to keep it tied to a particular user session.