Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions R/theme.R
Original file line number Diff line number Diff line change
Expand Up @@ -545,13 +545,14 @@
}

# Standardise spelling
elements <- replace_null(
elements,
palette.colour.discrete = elements$palette.color.discrete,
palette.colour.continuous = elements$palette.color.continuous
)
elements$palette.color.discrete <- NULL
elements$palette.color.continuous <- NULL
if ("palette.color.continuous" %in% names(elements)) {
elements["palette.colour.continuous"] <- elements["palette.color.continuous"]
elements[["palette.color.continuous"]] <- NULL

Check warning on line 550 in R/theme.R

View check run for this annotation

Codecov / codecov/patch

R/theme.R#L549-L550

Added lines #L549 - L550 were not covered by tests
}
if ("palette.color.discrete" %in% names(elements)) {
elements["palette.colour.discrete"] <- elements["palette.color.discrete"]
elements[["palette.color.discrete"]] <- NULL

Check warning on line 554 in R/theme.R

View check run for this annotation

Codecov / codecov/patch

R/theme.R#L553-L554

Added lines #L553 - L554 were not covered by tests
}

# Check for incompatible options
pals <- c("palette.colour.discrete", "palette.colour.continuous",
Expand Down