Skip to content

Commit eb809e3

Browse files
committed
withProgress: check that session is a session object
1 parent 0205ad7 commit eb809e3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

R/progress.R

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,9 @@ withProgress <- function(expr, min = 0, max = 1,
231231
if (!quoted)
232232
expr <- substitute(expr)
233233

234+
# A hacky check to make sure the session object is indeed a session object.
235+
if (is.null(session$onFlush)) stop("'session' is not a session object.")
236+
234237
p <- Progress$new(session, min = min, max = max)
235238

236239
session$progressStack$push(p)

0 commit comments

Comments
 (0)