Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

* Fixed #3898: `wrapFunctionLabel()` no longer throws an error if the `name` is longer than 10000 bytes. (#3903)

* On r-devel (R > 4.3.1), `isTruthy(NULL)` now returns `FALSE` (as it does with older versions of R). (#3906)

# shiny 1.7.5

## Possibly breaking changes
Expand Down
6 changes: 2 additions & 4 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -1240,14 +1240,12 @@ dotloop <- function(fun_, ...) {
#' @param x An expression whose truthiness value we want to determine
#' @export
isTruthy <- function(x) {
if (is.null(x))
return(FALSE)
if (inherits(x, 'try-error'))
return(FALSE)

if (!is.atomic(x))
return(TRUE)

if (is.null(x))
return(FALSE)
if (length(x) == 0)
return(FALSE)
if (all(is.na(x)))
Expand Down
3 changes: 3 additions & 0 deletions tests/testthat/test-tabPanel.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ expect_snapshot2 <- function(...) {
if (getRversion() < "3.6.0") {
skip("Skipping snapshots on R < 3.6 because of different RNG method")
}
if (packageVersion("htmltools") <= "0.5.6") {
skip("Skipping snapshots since htmltools is 'outdated'")
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is needed since these tabPanel() tests ultimately call tagQuery() in such a way that rstudio/htmltools#408 becomes problematic (for r-devel).

expect_snapshot(...)
}

Expand Down