Skip to content

Commit 3696315

Browse files
committed
Explicitly include NULL as a value that tagQueryFindDescendants_() shouldn't traverse (#408)
1 parent 3fab22f commit 3696315

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: htmltools
22
Type: Package
33
Title: Tools for HTML
4-
Version: 0.5.6
4+
Version: 0.5.7
55
Authors@R: c(
66
person("Joe", "Cheng", role = "aut", email = "[email protected]"),
77
person("Carson", "Sievert", role = c("aut", "cre"), email = "[email protected]", comment = c(ORCID = "0000-0002-4958-2844")),

NEWS.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# htmltools 0.5.7
2+
3+
## Improvements
4+
5+
* `tagQuery()` no longer throws an error when attempting to traverse a NULL value with r-devel. (#407)
6+
17
# htmltools 0.5.6
28

39
## Possibly breaking changes

R/tag_query.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1532,7 +1532,7 @@ tagQueryFindDescendants_ <- function(el, selector, fn) {
15321532
} else if (is.list(el)) {
15331533
# For each item in the list like object, recurse through
15341534
walk(el, tagQueryFindDescendants_, fn = fn, selector = selector)
1535-
} else if (is.atomic(el) || is.function(el) || is.language(el)) {
1535+
} else if (is.null(el) || is.atomic(el) || is.function(el) || is.language(el)) {
15361536
# Can not match on atomics or functions
15371537
return()
15381538
} else {

0 commit comments

Comments
 (0)