Skip to content

Commit 0608d6b

Browse files
committed
fix for NULL layer (default)
1 parent edb44fb commit 0608d6b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

R/wbt_source.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ wbt_source <- function(x,
3131
stop("package `terra` is required to convert non-Shapefile vector sources to Shapefile")
3232
}
3333

34-
x2 <- terra::vect(x, layer = layer)
34+
x2 <- terra::vect(x, layer = ifelse(is.null(layer), "", layer))
3535
if (terra::writeVector(x2, fp)) {
3636
x <- fp
3737
} else {

0 commit comments

Comments
 (0)