Skip to content

Commit eea7af9

Browse files
committed
only set marker.line.color when marker.color exists
1 parent d646cbf commit eea7af9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

R/plotly_build.R

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -506,8 +506,9 @@ map_color <- function(traces, title = "", na.color = "transparent") {
506506
# TODO: allow users to control via a `stroke`` argument
507507
# to make consistent, in "filled polygons", color -> fillcolor, stroke -> line.color
508508
for (i in seq_along(color)) {
509-
traces[[i]]$marker$line$color <-
510-
traces[[i]]$marker$line$color %||% "transparent"
509+
if (!is.null(traces[[i]]$marker$color)) {
510+
traces[[i]]$marker$line$color <- traces[[i]]$marker$line$color %||% "transparent"
511+
}
511512
}
512513

513514
traces

0 commit comments

Comments
 (0)