bug rendering english VP

This commit is contained in:
lingdocs 2022-05-25 18:57:20 -05:00
parent 9f82e6d085
commit faecbcf83e
2 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@lingdocs/pashto-inflector",
"version": "2.6.0",
"version": "2.6.1",
"author": "lingdocs.com",
"description": "A Pashto inflection and verb conjugation engine, inculding React components for displaying Pashto text, inflections, and conjugations",
"homepage": "https://verbs.lingdocs.com",

View File

@ -384,14 +384,14 @@ function compileEnglishVP(VP: T.VPRendered): string[] | undefined {
}
const engSubj = getRenderedSubjectSelection(VP.blocks).selection;
const obj = getRenderedObjectSelection(VP.blocks).selection;
const engObj = typeof obj === "object" ? obj.e : "";
const engObj = typeof obj === "object" ? obj : undefined;
const engAPs = getEnglishAPs(VP.blocks);
// require all English parts for making the English phrase
return (VP.englishBase && engSubj && engObj !== undefined)
? VP.englishBase.map(e => insertEWords(e, {
// TODO: make sure we actually have the english
subject: getEnglishFromRendered(engSubj) || "",
object: getEnglishFromRendered(engSubj) || "",
object: engObj ? getEnglishFromRendered(engObj) : "",
APs: engAPs,
}))
: undefined;