Skip to content

Commit

Permalink
Clarify error message
Browse files Browse the repository at this point in the history
  • Loading branch information
teunbrand committed Oct 9, 2023
1 parent 96736f5 commit 2ad2474
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion R/utilities-patterns.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ fill_alpha <- function(fill, alpha) {
# key that is trying to draw a single colour. It can be given that colour
# as a list due to patterns in other keys.
msg <- paste0(
"{.field fill} must be a valid colour or list of ",
"{.field fill} must be a vector of colours or list of ",
"{.cls GridPattern} objects."
)
# If single colour list, try applying `alpha()`
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/_snaps/patterns.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# fill_alpha works as expected

fill must be a valid colour or list of <GridPattern> objects.
fill must be a vector of colours or list of <GridPattern> objects.

---

fill must be a valid colour or list of <GridPattern> objects.
fill must be a vector of colours or list of <GridPattern> objects.

0 comments on commit 2ad2474

Please sign in to comment.