Skip to content

Commit fa51a0b

Browse files
committed
Use local to remove rm() call
Related: tidyverse/ggplot2#6522
1 parent 10995cd commit fa51a0b

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

R/ggmatrix.R

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,8 @@ S7::method(convert, list(from = ggmatrix, to = S7::class_list)) <-
229229
c(vals, meta)
230230
}
231231

232-
S7::method(as.list, class_ggplot) <- function(x, ...) {
233-
convert(x, S7::class_list)
234-
}
235-
rm(`as.list`)
232+
local({
233+
S7::method(as.list, class_ggplot) <- function(x, ...) {
234+
convert(x, S7::class_list)
235+
}
236+
})

0 commit comments

Comments
 (0)