diff --git a/R/type-asis.R b/R/type-asis.R index b838b5e31..06f905490 100644 --- a/R/type-asis.R +++ b/R/type-asis.R @@ -115,6 +115,6 @@ asis_strip <- function(x) { asis_restore <- function(x) { # Using `oldClass()` here to return `NULL` for atomics # so that their implicit class isn't added - class(x) <- c("AsIs", oldClass(x)) + class(x) <- unique.default(c("AsIs", oldClass(x))) x }