Skip to content

Commit b7dd203

Browse files
committed
fix recursion logic
1 parent e60648f commit b7dd203

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

R/style.R

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,10 @@ style <- function(p, ..., traces = NULL) {
6464
#' @param path character vector of path elements: c("marker", "line", "size")
6565
trace_replace <- function(trace, path, value) {
6666
if (length(path) == 0) return(trace)
67-
if (length(path == 1)) {
67+
if (length(path) == 1) {
6868
trace[[path]] <- value
6969
return(trace)
7070
}
71-
trace_replace(trace[[path[1]]], path[-1], value)
71+
trace[[path[1]]] <- trace_replace(trace[[path[1]]], path[-1], value)
72+
trace
7273
}

0 commit comments

Comments
 (0)