mirror of
https://github.com/rstudio/shiny.git
synced 2026-02-03 19:25:15 -05:00
Fix edge case with nested choices. Fixes #560
When the set of choices is a list containing a named vector of length 1, choicesWithNames would return the wrong result.
This commit is contained in:
@@ -681,7 +681,7 @@ choicesWithNames <- function(choices) {
|
||||
res <- lapply(obj, function(val) {
|
||||
if (is.list(val))
|
||||
listify(val)
|
||||
else if (length(val) == 1)
|
||||
else if (length(val) == 1 && is.null(names(val)))
|
||||
val
|
||||
else
|
||||
makeNamed(as.list(val))
|
||||
|
||||
Reference in New Issue
Block a user