Skip to content

Commit 6946afc

Browse files
Copy defaults in Plot constructor
1 parent 22be833 commit 6946afc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/PlotlyLight.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ mutable struct Plot
116116

117117
function Plot(
118118
data::Union{Config, Vector{Config}},
119-
layout::Config = Defaults.layout[],
120-
config::Config = Defaults.config[];
119+
layout::Config = copy(Defaults.layout[]),
120+
config::Config = copy(Defaults.config[]);
121121
# kw
122122
id::AbstractString = randstring(10),
123123
js::Cobweb.Javascript = Cobweb.Javascript("console.log('plot created!')")

0 commit comments

Comments
 (0)