We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3280cd1 commit cee9a81Copy full SHA for cee9a81
1 file changed
R/utils.R
@@ -23,15 +23,15 @@
23
#' @param obj The object whose class should be checked.
24
#' @param obj_name A character string with the name of the object (used in error messages).
25
#' @param permitted_classes A character vector of allowed class names.
26
-#'
+#' @importFrom glue glue glue_collapse
27
#' @return Invisibly returns `TRUE` if the class check passes; otherwise throws an error.
28
#' @noRd
29
.check_class <- function(obj, obj_name, permitted_classes) {
30
typ <- class(obj)
31
32
if (!any(permitted_classes %in% typ)) {
33
msg <- glue(
34
- "The server-side object must be of type {paste(permitted_classes, collapse = ' or ')}. ",
+ "The server-side object must be of type {glue_collapse(permitted_classes, sep = ' or ')}. ",
35
"'{obj_name}' is type {typ}."
36
)
37
0 commit comments