Skip to content

Commit c8fcb76

Browse files
committed
Minor fix
1 parent 72da802 commit c8fcb76

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def update_image(clickData, relayoutData, click_n, click_p, click_c, slider_val,
7676
center = utils.compute_circle_center(shapes[i]['path'])
7777
new_path = utils.draw_circle(center, slider_val)
7878
shapes[i]['path'] = new_path
79-
elif button_id in ['clear', 'next', 'previous']:
79+
elif button_id in ['clear', 'next', 'previous']:
8080
if button_id == 'clear':
8181
view.fig.layout.shapes = []
8282
view.fig.layout.xaxis.autorange = True
@@ -88,7 +88,7 @@ def update_image(clickData, relayoutData, click_n, click_p, click_c, slider_val,
8888
return view.make_figure_image(ind_image), view.options[0], ind_image, '[]'
8989

9090
already_labeled = [shape['name'] for shape in shapes]
91-
keys = list(relayoutData)
91+
keys = list(relayoutData) if relayoutData else []
9292
key = keys[0] if len(keys) > 0 else ""
9393
if option not in already_labeled and button_id != 'slider' and 'relayout' not in event:
9494
if clickData:

0 commit comments

Comments
 (0)