Skip to content

Commit

Permalink
Apply facet rule only when supplied (#599)
Browse files Browse the repository at this point in the history
Closes #595
  • Loading branch information
vedhav authored Nov 20, 2023
1 parent f1a3014 commit 28d04b0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# teal.modules.general 0.2.16.9010
# teal.modules.general 0.2.16.9011

### Enhancements

Expand Down
10 changes: 6 additions & 4 deletions R/tm_g_response.R
Original file line number Diff line number Diff line change
Expand Up @@ -238,10 +238,12 @@ srv_g_response <- function(id,

rule_diff <- function(other) {
function(value) {
othervalue <- selector_list()[[other]]()[["select"]]
if (!is.null(othervalue)) {
if (identical(value, othervalue)) {
"Row and column facetting variables must be different."
if (other %in% names(selector_list())) {
othervalue <- selector_list()[[other]]()[["select"]]
if (!is.null(othervalue)) {
if (identical(value, othervalue)) {
"Row and column facetting variables must be different."
}
}
}
}
Expand Down

0 comments on commit 28d04b0

Please sign in to comment.