Skip to content

Commit

Permalink
Fix expression label bug
Browse files Browse the repository at this point in the history
  • Loading branch information
teunbrand committed Dec 12, 2023
1 parent 5ed2d88 commit 8e185ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/guide-axis-theta.R
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ GuideAxisTheta <- ggproto(
key <- vec_slice(key, !vec_detect_missing(key$.label %||% NA))

# Early exit if drawing no labels
labels <- key$.label
labels <- validate_labels(key$.label)
if (length(labels) < 1) {
return(zeroGrob())
}
Expand Down Expand Up @@ -255,7 +255,7 @@ GuideAxisTheta <- ggproto(

key <- params$key
key <- vec_slice(key, !is.na(key$.label) & nzchar(key$.label))
labels <- key$.label
labels <- validate_labels(key$.label)
if (length(labels) == 0 || inherits(elements$text, "element_blank")) {
return(list(offset = offset))
}
Expand Down

0 comments on commit 8e185ea

Please sign in to comment.