diff --git a/package.json b/package.json index 46e07ba..a063d63 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lingdocs/pashto-inflector", - "version": "3.7.2", + "version": "3.7.3", "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-np.ts b/src/lib/phrase-building/render-np.ts index aeb6fa4..ea9a70f 100644 --- a/src/lib/phrase-building/render-np.ts +++ b/src/lib/phrase-building/render-np.ts @@ -52,11 +52,14 @@ export function renderNounSelection(n: T.NounSelection, inflected: boolean, role const infs = inflectWord(n.entry); const ps = n.number === "singular" ? getInf(infs, "inflections", n.gender, false, inflected) - : [ - ...getInf(infs, "plural", n.gender, true, inflected), - ...getInf(infs, "arabicPlural", n.gender, true, inflected), - ...getInf(infs, "inflections", n.gender, true, inflected), - ]; + : (() => { + const plural = getInf(infs, "plural", n.gender, true, inflected); + return [ + ...plural, + ...getInf(infs, "arabicPlural", n.gender, true, inflected), + ...!plural.length ? getInf(infs, "inflections", n.gender, true, inflected) : [], + ]; + })(); return ps.length > 0 ? ps : [psStringFromEntry(n.entry)];