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", "name": "@lingdocs/pashto-inflector",
"version": "3.2.3", "version": "3.2.4",
"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",

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> { export function renderAdverbSelection(a: T.AdverbSelection): T.Rendered<T.AdverbSelection> {
const e = getEnglishWord(a.entry); const ew = getEnglishWord(a.entry);
if (!e || typeof e !== "string") { const e = typeof ew === "object"
throw new Error("error getting english for compliment"); ? (ew.singular || "")
} : !ew
? ""
: ew;
return { return {
type: "adverb", type: "adverb",
entry: a.entry, entry: a.entry,