fix english appearing for intransitives

This commit is contained in:
lingdocs 2022-03-19 00:37:50 +04:00
parent 1bf14eb44f
commit 004bdeb352
1 changed files with 6 additions and 4 deletions

View File

@ -154,8 +154,10 @@ function compileEnglish(VP: VPRendered): string[] | undefined {
const engSubj = VP.subject.e || undefined;
const engObj = (typeof VP.object === "object" && VP.object.e) ? VP.object.e : undefined;
// require all English parts for making the English phrase
return (VP.englishBase && engSubj && engObj) ? VP.englishBase.map(e => insertEWords(e, {
subject: engSubj,
object: engObj,
})) : undefined;
return (VP.englishBase && engSubj && (engObj || typeof VP.object !== "object"))
? VP.englishBase.map(e => insertEWords(e, {
subject: engSubj,
object: engObj,
}))
: undefined;
}