From 28d04b0fd5fcd78d7af703284cea424e063d6817 Mon Sep 17 00:00:00 2001 From: Vedha Viyash <49812166+vedhav@users.noreply.github.com> Date: Mon, 20 Nov 2023 20:17:11 +0530 Subject: [PATCH] Apply facet rule only when supplied (#599) Closes #595 --- NEWS.md | 2 +- R/tm_g_response.R | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/NEWS.md b/NEWS.md index 96528763a..9318985c7 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# teal.modules.general 0.2.16.9010 +# teal.modules.general 0.2.16.9011 ### Enhancements diff --git a/R/tm_g_response.R b/R/tm_g_response.R index f3cd52c1d..fe3ecd43c 100644 --- a/R/tm_g_response.R +++ b/R/tm_g_response.R @@ -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." + } } } }