Skip to content

Commit

Permalink
🐛 all demo sessions should have a language
Browse files Browse the repository at this point in the history
Signed-off-by: Marcus Fihlon <[email protected]>
  • Loading branch information
McPringle committed Jul 6, 2024
1 parent 620d7cd commit 1b43e5d
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,13 @@ public boolean isEnabled() {
private @NotNull Language getRandomLanguage() {
final var values = Arrays.asList(Language.values());
final int size = values.size();
return values.get(RANDOM.nextInt(size));

Language language = Language.UNKNOWN;
while (language == Language.UNKNOWN) {
language = values.get(RANDOM.nextInt(size));
}

return language;
}

private @NotNull Track getRandomTrack() {
Expand Down

0 comments on commit 1b43e5d

Please sign in to comment.