Skip to content

Commit

Permalink
chore: simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
vedhav committed Oct 16, 2024
1 parent c068ac3 commit 05befbf
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions R/toggleable_slider.R
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,9 @@ toggle_slider_server <- function(id, is_dichotomous_slider = TRUE, step_slider =

# only update provided components, do not discasrd others
old_state <- cur_state()
if (is.null(old_state)) {
old_state <- new_state
if (!is.null(old_state)) {
new_state <- utils::modifyList(old_state, new_state)
}
new_state <- utils::modifyList(old_state, new_state)

if (!setequal(new_state, cur_state())) {
cur_state(new_state)
Expand Down

0 comments on commit 05befbf

Please sign in to comment.