From 004bdeb352889a7a348437751b2eaece71f54a61 Mon Sep 17 00:00:00 2001 From: lingdocs <71590811+lingdocs@users.noreply.github.com> Date: Sat, 19 Mar 2022 00:37:50 +0400 Subject: [PATCH] fix english appearing for intransitives --- src/lib/phrase-building/compile-vp.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/lib/phrase-building/compile-vp.ts b/src/lib/phrase-building/compile-vp.ts index 4a491b3..b1efbdd 100644 --- a/src/lib/phrase-building/compile-vp.ts +++ b/src/lib/phrase-building/compile-vp.ts @@ -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; } \ No newline at end of file