Refine vocabulary selection logic in VocabLessonView to prevent duplicates
- Updated the condition for adding vocabulary options to ensure that normalized vocabulary entries are checked against the exclusion set, preventing duplicates and enhancing the learning experience.
This commit is contained in:
@@ -1070,7 +1070,7 @@ export default {
|
||||
let index = 0;
|
||||
while (options.size < 4 && index < genericOptions.length) {
|
||||
const option = genericOptions[index];
|
||||
if (!excludeSet.has(option)) {
|
||||
if (!normalizedExcludeSet.has(this.normalizeVocab(option)) && !options.has(option)) {
|
||||
options.add(option);
|
||||
}
|
||||
index++;
|
||||
|
||||
Reference in New Issue
Block a user