Skip to content

Commit 593c989

Browse files
committed
support unnest_wider on Date class columns
1 parent 61e9209 commit 593c989

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

R/rectangle.R

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,11 @@ simplify_col <- function(x, nm, ptype = list(), transform = list(), simplify = F
401401
}
402402

403403
# Ensure empty elements filled in with a single unspecified value
404-
x[n == 0] <- list(NA)
404+
x[n == 0] <- if (is.list(x)) {
405+
list(NA)
406+
} else {
407+
NA
408+
}
405409

406410
if (is.null(ptype)) {
407411
tryCatch(

0 commit comments

Comments
 (0)