diff --git a/DESCRIPTION b/DESCRIPTION index f4d99792..ca33b75a 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: htmltools Type: Package Title: Tools for HTML -Version: 0.5.6 +Version: 0.5.7 Authors@R: c( person("Joe", "Cheng", role = "aut", email = "joe@posit.co"), person("Carson", "Sievert", role = c("aut", "cre"), email = "carson@posit.co", comment = c(ORCID = "0000-0002-4958-2844")), diff --git a/NEWS.md b/NEWS.md index f9bcc2b7..27c6a0be 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,9 @@ +# htmltools 0.5.7 + +## Improvements + +* `tagQuery()` no longer throws an error when attempting to traverse a NULL value with r-devel. (#407) + # htmltools 0.5.6 ## Possibly breaking changes 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 {