Skip to content

Commit 009f44e

Browse files
committed
Avoid :: on old ggplot2 function
1 parent 69a81ec commit 009f44e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

R/ggplotly.R

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1157,8 +1157,9 @@ utils::globalVariables(c("groupDomains", "layers", "prestats_data", "scales", "s
11571157

11581158
# Get the "complete" set of theme elements and their calculated values
11591159
calculated_theme_elements <- function(plot) {
1160-
if (is.function(asNamespace("ggplot2")$complete_theme)) {
1161-
theme <- ggplot2::complete_theme(plot$theme)
1160+
complete_theme <- ggfun("complete_theme")
1161+
if (is.function(complete_theme)) {
1162+
theme <- complete_theme(plot$theme)
11621163
elements <- names(theme)
11631164
} else {
11641165
theme <- ggfun("plot_theme")(plot)

0 commit comments

Comments
 (0)