fix render adv problem

This commit is contained in:
lingdocs 2022-07-03 13:53:40 -05:00
parent 9af7a91253
commit f770a93270
2 changed files with 7 additions and 5 deletions

View File

@ -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",

View File

@ -136,10 +136,12 @@ function renderEquative(es: T.EquativeSelection, person: T.Person): T.EquativeRe
}
export function renderAdverbSelection(a: T.AdverbSelection): T.Rendered<T.AdverbSelection> {
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,