We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e8b62f6 commit 1050f09Copy full SHA for 1050f09
R/theme.R
@@ -576,8 +576,9 @@ plot_theme <- function(x, default = theme_get()) {
576
# Check that all elements have the correct class (element_text, unit, etc)
577
validate_theme(theme)
578
579
-
580
- theme[intersect(names(theme), names(get_element_tree()))]
+ # Remove elements that are not registered
+ theme[setdiff(names(theme), names(get_element_tree()))] <- NULL
581
+ theme
582
}
583
584
#' Modify properties of an element in a theme object
0 commit comments