@@ -3,6 +3,7 @@ using HTTPClient.HTTPC
33using JSON
44using Debug
55
6+ include (" plot.jl" )
67
78type CurrentPlot
89 filename:: String
@@ -92,13 +93,17 @@ function set_credentials_file(input_creds::Dict)
9293
9394 # check to see if dir/file exists --> if not create it
9495 try
95- mkdir (plotly_credential_folder )
96+ mkdir (plotly_credentials_folder )
9697 catch err
9798 isa (err, SystemError) || rethrow (err)
9899 end
99100
100101 # merge input creds with prev creds
101- creds = merge (prev_creds, input_creds)
102+ if prev_creds != nothing
103+ creds = merge (prev_creds, input_creds)
104+ else
105+ creds = input_creds
106+ end
102107
103108 # write the json strings to the cred file
104109 creds_file = open (plotly_credentials_file, " w" )
@@ -125,7 +130,11 @@ function set_config_file(input_config::Dict)
125130 end
126131
127132 # merge input config with prev config
128- config = merge (prev_config, input_config)
133+ if prev_config != nothing
134+ config = merge (prev_config, input_config)
135+ else
136+ config = input_config
137+ end
129138
130139 # write the json strings to the config file
131140 config_file = open (plotly_config_file, " w" )
@@ -209,8 +218,6 @@ function plot(data::Array,options=Dict())
209218 end
210219end
211220
212- include (" plot.jl" )
213-
214221function layout (layout_opts:: Dict ,meta_opts= Dict ())
215222 creds = get_credentials ()
216223 endpoint = get_plot_endpoint ()
0 commit comments