Skip to content

Commit ee5a43c

Browse files
committed
fix for Plot vector
1 parent 29c3aba commit ee5a43c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/handler/processors/callback.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ function _push_to_res!(res, value, out)
2727
)
2828
end
2929

30+
_single_element_vect(e::T) where {T} = T[e]
3031
function process_callback_call(app, callback_id, outputs, inputs, state)
3132
cb = app.callbacks[callback_id]
3233
res = cb.func(make_args(inputs, state)...)
3334
(res isa NoUpdate) && throw(PreventUpdate())
34-
res_vector = is_multi_out(cb) ? res : [res]
35-
35+
res_vector = is_multi_out(cb) ? res : _single_element_vect(res)
3636
validate_callback_return(outputs, res_vector, callback_id)
3737

3838
response = Dict{String, Any}()

0 commit comments

Comments
 (0)