tunght commited on
Commit
c423c77
·
1 Parent(s): 9aa0efe

Add remove button

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -231,6 +231,9 @@ def add_output_click(*struct_ref):
231
  def remove_output_click(*struct_ref):
232
  global visible
233
  print("Removing output", visible)
 
 
 
234
  visible -= 1
235
  structure_texts = struct_ref[::2]
236
  reference_texts = struct_ref[1::2]
 
231
  def remove_output_click(*struct_ref):
232
  global visible
233
  print("Removing output", visible)
234
+ if visible == 0:
235
+ return struct_ref
236
+
237
  visible -= 1
238
  structure_texts = struct_ref[::2]
239
  reference_texts = struct_ref[1::2]