Skip to content

Commit 42f0d10

Browse files
committed
Be more careful about searching for default aesthetics, closes #1457
1 parent 4473d64 commit 42f0d10

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

R/layers2traces.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -999,7 +999,7 @@ aes2plotly <- function(data, params, aes = "size") {
999999
defaults <- if (inherits(data, "GeomSf")) {
10001000
type <- if (any(grepl("point", class(data)))) "point" else if (any(grepl("line", class(data)))) "line" else ""
10011001
ggfun("default_aesthetics")(type)
1002-
} else {
1002+
} else if ("default_aes" %in% names(ggfun(geom))) {
10031003
ggfun(geom)$default_aes
10041004
}
10051005

0 commit comments

Comments
 (0)