Skip to content

Commit

Permalink
#43 fix findFeatureByName
Browse files Browse the repository at this point in the history
  • Loading branch information
eblondel committed Jul 7, 2021
1 parent 0c00db0 commit d760ff1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/WMSCapabilities.R
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ WMSCapabilities <- R6Class("WMSCapabilities",
findLayerByName = function(expr, exact = TRUE){
result <- lapply(private$layers, function(x){
ft <- NULL
if(attr(regexpr(expr, x$getName()), "match.length") != -1
if(!is.null(x$getName())) if(attr(regexpr(expr, x$getName()), "match.length") != -1
&& endsWith(x$getName(), expr)){
ft <- x
}
Expand Down

0 comments on commit d760ff1

Please sign in to comment.