Skip to content

Commit 359ec28

Browse files
trekonomcpsievert
andcommitted
Apply suggestions from code review
Co-authored-by: Carson Sievert <[email protected]>
1 parent 805193b commit 359ec28

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

R/ggplotly.R

+7-10
Original file line numberDiff line numberDiff line change
@@ -937,16 +937,13 @@ gg2list <- function(p, width = NULL, height = NULL,
937937
}
938938
# Only FacetGrid has no cols
939939
if (inherits(plot$facet, "FacetGrid")) {
940-
row_txt <- if (!length(names(plot$facet$params$rows)) == 0) {
941-
paste(
942-
plot$facet$params$labeller(
943-
lay[names(plot$facet$params$rows)]
944-
),
945-
collapse = br()
946-
)
947-
} else {
948-
""
949-
}
940+
row_txt <- paste(
941+
plot$facet$params$labeller(
942+
lay[names(plot$facet$params$rows)]
943+
),
944+
collapse = br()
945+
)
946+
if (length(names(plot$facet$params$rows)) == 0) row_txt <- ""
950947
if (is_blank(theme[["strip.text.y"]])) row_txt <- ""
951948
if (lay$COL != nCols) row_txt <- ""
952949
if (robust_nchar(row_txt) > 0) {

0 commit comments

Comments
 (0)