Skip to content

Commit

Permalink
fix: restore randomize examples setting
Browse files Browse the repository at this point in the history
  • Loading branch information
JarbasAl committed Nov 17, 2024
1 parent c6e40e6 commit c498bf7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,9 @@ def update_examples(self):
for _skill_id, data in dict(self.skill_examples).items():
examples += data.get(self.lang, [])
examples = [e for e in examples if e.strip()] # ensure no empty strings
if self.settings.get("randomize_examples", True):
random.shuffle(examples)
if examples:
if self.settings.get("randomize_examples", True):
random.shuffle(examples)
self.gui['skill_examples'] = {"examples": examples}
self.gui['skill_info_enabled'] = self.examples_enabled
else:
Expand Down

0 comments on commit c498bf7

Please sign in to comment.