File tree 1 file changed +8
-1
lines changed
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -701,9 +701,16 @@ items_as_tibble.doc_item <- function(items) {
701
701
items_as_tibble.doc_items <- function (items ) {
702
702
check_items(items )
703
703
non_atomic <- non_atomic_properties(items )
704
+ properties <- items_fields(items , " properties" )
704
705
data <- lapply(items $ features , function (item ) {
706
+ # fill unavailable properties
707
+ unavailable_properties <- setdiff(properties , names(item $ properties ))
708
+ item $ properties [unavailable_properties ] <- NA
709
+ # update non-atomic properties
705
710
item $ properties [non_atomic ] <- lapply(item $ properties [non_atomic ], list )
706
- item $ properties
711
+ # return properties from items in the same order
712
+ # to avoid errors in the `mapply`
713
+ item $ properties [properties ]
707
714
})
708
715
data <- do.call(mapply , args = c(list (FUN = c , SIMPLIFY = FALSE ), data ))
709
716
structure(
You can’t perform that action at this time.
0 commit comments