From f770a9327005dd4ad3834173ecde439596ac4d04 Mon Sep 17 00:00:00 2001 From: lingdocs <71590811+lingdocs@users.noreply.github.com> Date: Sun, 3 Jul 2022 13:53:40 -0500 Subject: [PATCH] fix render adv problem --- package.json | 2 +- src/lib/phrase-building/render-ep.ts | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 64778b0..e4e5c49 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lingdocs/pashto-inflector", - "version": "3.2.3", + "version": "3.2.4", "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", diff --git a/src/lib/phrase-building/render-ep.ts b/src/lib/phrase-building/render-ep.ts index ac440fe..5416c14 100644 --- a/src/lib/phrase-building/render-ep.ts +++ b/src/lib/phrase-building/render-ep.ts @@ -136,10 +136,12 @@ function renderEquative(es: T.EquativeSelection, person: T.Person): T.EquativeRe } export function renderAdverbSelection(a: T.AdverbSelection): T.Rendered { - const e = getEnglishWord(a.entry); - if (!e || typeof e !== "string") { - throw new Error("error getting english for compliment"); - } + const ew = getEnglishWord(a.entry); + const e = typeof ew === "object" + ? (ew.singular || "") + : !ew + ? "" + : ew; return { type: "adverb", entry: a.entry,