File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -256,11 +256,19 @@ Dash <- R6::R6Class(
256256
257257 # set the callback context associated with this invocation of the callback
258258 private $ callback_context_ <- setCallbackContext(request $ body )
259-
259+
260+ # throw an exception when request$body is NULL
261+ if (is.null(private $ callback_context_ )) {
262+ stop(" callback_context cannot be stored if request$body is NULL." )
263+ }
264+
260265 output_value <- getStackTrace(do.call(callback , callback_args ),
261266 debug = private $ debug ,
262267 pruned_errors = private $ pruned_errors )
263-
268+
269+ # reset callback context
270+ private $ callback_context_ <- NULL
271+
264272 # pass on output_value to encode_plotly in case there are dccGraph
265273 # components which include Plotly.js figures for which we'll need to
266274 # run plotly_build from the plotly package
You can’t perform that action at this time.
0 commit comments