Skip to content

Commit

Permalink
fix layout theme since NULL cannot be added to another theme
Browse files Browse the repository at this point in the history
  • Loading branch information
Yunuuuu committed Jan 9, 2025
1 parent b7e5b5d commit f5b60fa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion R/layout-chain-operator.R
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,6 @@ chain_layout_and_add.theme <- function(object, layout, object_name) {
ans <- NextMethod()
# to align with `patchwork`, we also modify the layout theme
# when using `&` to add the theme object.
ans@theme <- ans@theme + object
ans@theme <- ggfun("add_theme")(ans@theme, object)
ans
}
2 changes: 1 addition & 1 deletion R/layout-quad-operator.R
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,6 @@ quad_layout_and_add.theme <- function(object, quad, object_name) {
ans <- NextMethod()
# to align with `patchwork`, we also modify the layout theme
# when using `&` to add the theme object.
ans@theme <- ans@theme + object
ans@theme <- ggfun("add_theme")(ans@theme, object)
ans
}

0 comments on commit f5b60fa

Please sign in to comment.