Skip to content

Commit

Permalink
ggmark: fix names
Browse files Browse the repository at this point in the history
  • Loading branch information
Yunuuuu committed Dec 30, 2024
1 parent 233881f commit 321af46
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion R/ggmark.R
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,10 @@ MarkGg <- ggproto("MarkGg", AlignProto,
extra_links <- NULL
}
self$unlock()
self$mark$links <- c(extra_links, links)

# Do not use `vec_c()`, as it automatically extract `names` and assign
# it to the combined object, which may result in duplicated names.
self$mark$links <- new_pair_links(c(extra_links, links))
on.exit(self$mark <- mark) # restore the original `mark`
on.exit(self$lock(), add = TRUE)

Expand Down

0 comments on commit 321af46

Please sign in to comment.