Skip to content

Commit

Permalink
fix bug in skip_if_custom (possibility of NULL result)
Browse files Browse the repository at this point in the history
  • Loading branch information
jhelvy committed Aug 20, 2024
1 parent 8a30c21 commit 135963c
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions R/server.R
Original file line number Diff line number Diff line change
Expand Up @@ -391,12 +391,8 @@ handle_custom_skip_logic <- function(
# Evaluate the condition
condition_result <- rule$condition(input)

# Check if the condition is met (and not logical(0))
if (
(length(condition_result) > 0) &
(current_page != rule$target) &
condition_result
) {
# Check if the condition is met
if (isTRUE(condition_result) & (current_page != rule$target)) {
return(rule$target)
}
}
Expand Down

0 comments on commit 135963c

Please sign in to comment.