Skip to content

Commit 27f4025

Browse files
committed
prevent asis_restore from adding AsIs multiple times
1 parent c5db55c commit 27f4025

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

R/type-asis.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,6 @@ asis_strip <- function(x) {
115115
asis_restore <- function(x) {
116116
# Using `oldClass()` here to return `NULL` for atomics
117117
# so that their implicit class isn't added
118-
class(x) <- c("AsIs", oldClass(x))
118+
class(x) <- unique.default(c("AsIs", oldClass(x)))
119119
x
120120
}

0 commit comments

Comments
 (0)