(pronouns) safe guard against requesting unknown morphemes

this should only happen when something is misconfigured or a wrong <GrammarTables> is supplied, but it does hurt DX oftentimes
This commit is contained in:
Valentyne Stigloher 2024-09-17 16:10:18 +02:00
parent 01c92a9018
commit 16d97044c7

View File

@ -519,7 +519,7 @@ export class Pronoun {
}
const value = this.morphemes[morpheme];
if (value === null) {
if (value === null || value === undefined) {
return null;
}