Skip to content

Commit

Permalink
Fix #242
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasp85 committed Aug 8, 2023
1 parent 658e954 commit f7fbab5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions NEWS.md
Expand Up @@ -4,6 +4,8 @@
in a non-operation (i.e. the non-null part will be returned unmodified) (#290)
* Fix a bug that prevented plots with multi-level strips from being merged
together (#277)
* Patchworks will now render correctly when unserialised in a fresh session,
providing the patchwork package is available (#242)

# patchwork 1.1.2

Expand Down
2 changes: 2 additions & 0 deletions R/aaa.R
Expand Up @@ -17,3 +17,5 @@ GUIDE_TOP <- 5
GUIDE_BOTTOM <- 15

`%||%` <- function(x, y) if (is.null(x)) y else x

patchwork_namespace_link <- function() NULL
2 changes: 2 additions & 0 deletions R/add_plot.R
Expand Up @@ -53,6 +53,8 @@ as_patchwork.default <- function(x) {
as_patchwork.ggplot <- function(x) {
class(x) <- c('patchwork', class(x))
x$patches <- new_patchwork()
# Will ensure serialisation includes a link to the patchwork namespace
attr(x, 'patchwork_link') <- patchwork_namespace_link
x
}
#' @export
Expand Down

0 comments on commit f7fbab5

Please sign in to comment.