Skip to content

Commit bbf070f

Browse files
committed
Fix a bug where root node was not cleaned
1 parent ecec12c commit bbf070f

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

annotator/__main__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ def clean_game(game):
387387
"""
388388
node = game.end()
389389

390-
while not node == game.root():
390+
while True:
391391
prev_node = node.parent
392392

393393
node.comment = None
@@ -396,6 +396,9 @@ def clean_game(game):
396396
if not variation.is_main_variation():
397397
node.remove_variation(variation)
398398

399+
if node == game.root():
400+
break
401+
399402
node = prev_node
400403

401404
return node.root()

0 commit comments

Comments
 (0)