Skip to content

Commit 94d2004

Browse files
authored
Merge pull request #65 from plotly/plot_vector_workaround
Fix for PlotlyJS Plot vectors
2 parents 29c3aba + 14cc88f commit 94d2004

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "Dash"
22
uuid = "1b08a953-4be3-4667-9a23-3db579824955"
33
authors = ["Chris Parmer <[email protected]>", "Alexandr Romanenko <[email protected]>"]
4-
version = "0.1.1"
4+
version = "0.1.2"
55

66
[deps]
77
CodecZlib = "944b1d66-785c-5afd-91f1-9de20f533193"

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)