Skip to content

Commit

Permalink
Fix #180 Check if elements exist before fetching them
Browse files Browse the repository at this point in the history
thomasp85 committed Jun 17, 2020
1 parent 0115253 commit 3616cd1
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -18,6 +18,7 @@
unintelligeble error (#148)
* Fix a bug when trying to combine faceted plots with fixed aspect ratio (#156)
* Fix alignments of strips when only a single strip is present (#163)
* Fix a bug that caused theme void to result in errors (#180)

# patchwork 1.0.0

2 changes: 2 additions & 0 deletions R/wrap_elements.R
Original file line number Diff line number Diff line change
@@ -158,6 +158,8 @@ as_patch.formula <- function(x) {

#' @importFrom ggplot2 ggplotGrob
get_grob <- function(x, name) {
ind <- grep(paste0('^', name, '$'), x$layout$name)
if (length(ind) == 0) return(ggplot2::zeroGrob())
x$grobs[[grep(paste0('^', name, '$'), x$layout$name)]]
}
offscreen_dev <- function() {

0 comments on commit 3616cd1

Please sign in to comment.