Skip to content

Commit ad4952f

Browse files
committed
Remove use of startsWith, introduced with R 3.3.0
1 parent 98aef42 commit ad4952f

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)