Skip to content

Commit

Permalink
prevent asis_restore from adding AsIs multiple times
Browse files Browse the repository at this point in the history
  • Loading branch information
mjskay committed Dec 21, 2023
1 parent c5db55c commit 27f4025
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/type-asis.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit 27f4025

Please sign in to comment.