From f3ef51619e8b0922ea3bb438a2219fc2a2cca033 Mon Sep 17 00:00:00 2001 From: Carson Date: Mon, 2 Oct 2023 12:39:18 -0500 Subject: [PATCH 1/2] Close #407. Explictly include NULL as a value that tagQueryFindDescendants_() shouldn't traverse --- R/tag_query.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/tag_query.R b/R/tag_query.R index d310edb3..669c8d0a 100644 --- a/R/tag_query.R +++ b/R/tag_query.R @@ -1532,7 +1532,7 @@ tagQueryFindDescendants_ <- function(el, selector, fn) { } else if (is.list(el)) { # For each item in the list like object, recurse through walk(el, tagQueryFindDescendants_, fn = fn, selector = selector) - } else if (is.atomic(el) || is.function(el) || is.language(el)) { + } else if (is.null(el) || is.atomic(el) || is.function(el) || is.language(el)) { # Can not match on atomics or functions return() } else { From dc29118ad521eee9c7430608e4eb4ed18e081456 Mon Sep 17 00:00:00 2001 From: Carson Date: Mon, 2 Oct 2023 12:41:42 -0500 Subject: [PATCH 2/2] Update news --- NEWS.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/NEWS.md b/NEWS.md index d24688e2..36f5bb78 100644 --- a/NEWS.md +++ b/NEWS.md @@ -6,6 +6,8 @@ * `css()` now fully supports setting custom CSS properties (or CSS variables) via inline styles. When the name of a value passed to `css()` starts with `--`, it will be treated as a custom CSS property and absolutely no changes will be made to the variable. For example, `css("--font_size" = "3em")` returns `--font_size:3em;` while `css(font_size = "3em")` will return `font-size:3em`. (#402) +* `tagQuery()` no longer throws an error when attempting to traverse a NULL value with r-devel. (#407) + ## Bug fixes * `{htmltools}` now requires `{rlang}` version 1.0.0 or higher. (#403)