Skip to content

Commit ca47766

Browse files
committed
fix ol
1 parent 732c6b9 commit ca47766

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/textual/widgets/_option_list.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,8 @@ def add_options(self, new_options: Iterable[OptionListContent]) -> Self:
320320
new_options: Content of new options.
321321
"""
322322

323+
new_options = list(new_options)
324+
323325
option_ids = [
324326
option._id
325327
for option in new_options
@@ -330,7 +332,6 @@ def add_options(self, new_options: Iterable[OptionListContent]) -> Self:
330332
"New options contain duplicated IDs; Ensure that the IDs are unique."
331333
)
332334

333-
new_options = list(new_options)
334335
if not new_options:
335336
return self
336337
if new_options[0] is None:

0 commit comments

Comments
 (0)