Skip to content

Commit

Permalink
Bugfix: fixed missing letters at level 1.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nuclear-Squid committed Aug 22, 2024
1 parent 90418ab commit 9517c7e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion code/duck-typist.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ window.addEventListener('DOMContentLoaded', () => {
.map(letter => odk[letter]);

const lessonLetters = rawLetters.concat(deadkeyLetters).join('');
const newLetters = rawLetters.slice(-INCLUDE_NEW_LETTERS).join('');
const newLettersCount = gLessonLevel == STARTING_LEVEL ? STARTING_LEVEL : INCLUDE_NEW_LETTERS;
const newLetters = rawLetters.slice(-newLettersCount).join('');
const lessonRe = new RegExp(`^[${lessonLetters}]*[${newLetters}][${lessonLetters}]*$`)
const lessonFilter = word => lessonRe.test(word)

Expand Down

0 comments on commit 9517c7e

Please sign in to comment.