bug rendering english VP
This commit is contained in:
parent
9f82e6d085
commit
faecbcf83e
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@lingdocs/pashto-inflector",
|
"name": "@lingdocs/pashto-inflector",
|
||||||
"version": "2.6.0",
|
"version": "2.6.1",
|
||||||
"author": "lingdocs.com",
|
"author": "lingdocs.com",
|
||||||
"description": "A Pashto inflection and verb conjugation engine, inculding React components for displaying Pashto text, inflections, and conjugations",
|
"description": "A Pashto inflection and verb conjugation engine, inculding React components for displaying Pashto text, inflections, and conjugations",
|
||||||
"homepage": "https://verbs.lingdocs.com",
|
"homepage": "https://verbs.lingdocs.com",
|
||||||
|
|
|
@ -384,14 +384,14 @@ function compileEnglishVP(VP: T.VPRendered): string[] | undefined {
|
||||||
}
|
}
|
||||||
const engSubj = getRenderedSubjectSelection(VP.blocks).selection;
|
const engSubj = getRenderedSubjectSelection(VP.blocks).selection;
|
||||||
const obj = getRenderedObjectSelection(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);
|
const engAPs = getEnglishAPs(VP.blocks);
|
||||||
// require all English parts for making the English phrase
|
// require all English parts for making the English phrase
|
||||||
return (VP.englishBase && engSubj && engObj !== undefined)
|
return (VP.englishBase && engSubj && engObj !== undefined)
|
||||||
? VP.englishBase.map(e => insertEWords(e, {
|
? VP.englishBase.map(e => insertEWords(e, {
|
||||||
// TODO: make sure we actually have the english
|
// TODO: make sure we actually have the english
|
||||||
subject: getEnglishFromRendered(engSubj) || "",
|
subject: getEnglishFromRendered(engSubj) || "",
|
||||||
object: getEnglishFromRendered(engSubj) || "",
|
object: engObj ? getEnglishFromRendered(engObj) : "",
|
||||||
APs: engAPs,
|
APs: engAPs,
|
||||||
}))
|
}))
|
||||||
: undefined;
|
: undefined;
|
||||||
|
|
Loading…
Reference in New Issue