We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8776482 commit 0941f05Copy full SHA for 0941f05
R/utils.R
@@ -675,7 +675,7 @@ colorscale_json <- function(x) {
675
if (is.list(x) && length(x) == 2) {
676
n1 <- length(x[[1]])
677
n2 <- length(x[[2]])
678
- if (n1 != n2 || n1+n2 == 0) {
+ if (n1 != n2 || n1 == 0 || n2 == 0) {
679
warning("A colorscale list must of elements of the same (non-zero) length")
680
} else if (!is.data.frame(x) && can_be_numeric(x[[1]])) {
681
x <- data.frame(
0 commit comments