Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
teunbrand committed Sep 27, 2023
1 parent 69e7430 commit 45d2a43
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/scale-continuous.R
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ scale_x_continuous <- function(name = waiver(), breaks = waiver(),
guide = waiver(), position = "bottom",
sec.axis = waiver()) {
call <- caller_call()
if (is.null(call) || !startsWith(as.character(call[[1]]), "scale_")) {
if (is.null(call) || !any(startsWith(as.character(call[[1]]), "scale_"))) {
call <- current_call()
}
sc <- continuous_scale(
Expand All @@ -111,7 +111,7 @@ scale_y_continuous <- function(name = waiver(), breaks = waiver(),
guide = waiver(), position = "left",
sec.axis = waiver()) {
call <- caller_call()
if (is.null(call) || !startsWith(as.character(call[[1]]), "scale_")) {
if (is.null(call) || !any(startsWith(as.character(call[[1]]), "scale_"))) {
call <- current_call()
}
sc <- continuous_scale(
Expand Down

0 comments on commit 45d2a43

Please sign in to comment.