Skip to content

Commit bfa93a4

Browse files
committed
1 parent d0fbdc2 commit bfa93a4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

R/guide-.r

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
#' @export
1616
new_guide <- function(..., available_aes = "any", super) {
1717

18-
super <- check_subclass(super, "Guide", env = parent.frame())
18+
pf <- parent.frame()
19+
super <- check_subclass(super, "Guide", env = pf)
1920

2021
args <- list2(...)
2122

@@ -49,6 +50,10 @@ new_guide <- function(..., available_aes = "any", super) {
4950
))
5051
}
5152

53+
# Ensure 'order' is length 1 integer
54+
params$order <- vec_cast(params$order, 0L, x_arg = "order", call = pf)
55+
vec_assert(params$order, 0L, size = 1L, arg = "order", call = pf)
56+
5257
ggproto(
5358
NULL, super,
5459
params = params,

0 commit comments

Comments
 (0)