Skip to content

Commit 34a46fe

Browse files
committed
startsWith() would require a more recent version of R
1 parent 48a73f8 commit 34a46fe

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

R/proxy.R

+3-1
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@ plotlyProxy <- function(outputId, session = shiny::getDefaultReactiveDomain(),
2121
if (is.null(session)) {
2222
stop("plotlyProxy must be called from the server function of a Shiny app")
2323
}
24+
2425
if (!is.null(session$ns) && nzchar(session$ns(NULL)) &&
25-
!startsWith(outputId, session$ns(""))) {
26+
# TODO: require a recent version of R and use startsWith()?
27+
substring(outputId, 1, nchar(session$ns(""))) != session$ns("")) {
2628
outputId <- session$ns(outputId)
2729
}
2830
structure(

0 commit comments

Comments
 (0)