hasCurrentRestoreContext returns FALSE from server side

Fixes #2138.
This commit is contained in:
Joe Cheng
2018-07-30 10:03:36 -07:00
parent 81cc7c591e
commit 624fcfba45

View File

@@ -448,7 +448,13 @@ withRestoreContext <- function(ctx, expr) {
# Is there a current restore context?
hasCurrentRestoreContext <- function() {
restoreCtxStack$size() > 0
if (restoreCtxStack$size() > 0)
return(TRUE)
domain <- getDefaultReactiveDomain()
if (!is.null(domain) && !is.null(domain$restoreContext))
return(TRUE)
return(FALSE)
}
# Call to access the current restore context. First look on the restore