Skip to content

Commit

Permalink
fix: don't merge definitions with their sub-definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
adalinesimonian committed Jan 20, 2024
1 parent 26fe4da commit 59cf076
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/dictionary/providers/word.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -716,9 +716,17 @@ export class WordService {
}

case 'definition': {
const subDefinition = new Definition({ id: element.id });

for (const subElement of element.elements) {
this.transformDefinitionElement(dictionary, definition, subElement);
this.transformDefinitionElement(
dictionary,
subDefinition,
subElement,
);
}

definition.subDefinitions.push(subDefinition);
break;
}
}
Expand Down

0 comments on commit 59cf076

Please sign in to comment.