Skip to content

Commit 31572dc

Browse files
authored
Doesn't try to combine labels if labels are NULL (#4115)
* Doesn't try to combine labels if labels are NULL * Changes & to &&
1 parent 3aa2937 commit 31572dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

R/coord-polar.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ CoordPolar <- ggproto("CoordPolar", Coord,
281281
# Combine the two ends of the scale if they are close
282282
theta <- theta[!is.na(theta)]
283283
ends_apart <- (theta[length(theta)] - theta[1]) %% (2*pi)
284-
if (length(theta) > 0 && ends_apart < 0.05) {
284+
if (length(theta) > 0 && ends_apart < 0.05 && !is.null(labels)) {
285285
n <- length(labels)
286286
if (is.expression(labels)) {
287287
combined <- substitute(paste(a, "/", b),

0 commit comments

Comments
 (0)