Skip to content

Commit 5a6ef86

Browse files
authored
Merge pull request #414 from rstudio/joe/bugfix/remove-startswith
Remove use of startsWith, introduced with R 3.3.0
2 parents 98aef42 + ad4952f commit 5a6ef86

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

R/utils.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ leafletProxy <- function(mapId, session = shiny::getDefaultReactiveDomain(),
152152
# This won't be necessary in future versions of Shiny, as session$ns (and
153153
# other forms of ns()) will be smart enough to only namespace un-namespaced
154154
# IDs.
155-
if (!is.null(session$ns) && nzchar(session$ns(NULL)) && !startsWith(mapId, session$ns(""))) {
155+
if (!is.null(session$ns) && nzchar(session$ns(NULL)) && substring(mapId, 1, nchar(session$ns(""))) != session$ns("")) {
156156
mapId <- session$ns(mapId)
157157
}
158158

0 commit comments

Comments
 (0)