diff --git a/package.json b/package.json
index 8c0de20..4022a95 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@lingdocs/pashto-inflector",
- "version": "1.8.1",
+ "version": "1.8.2",
"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/components/np-picker/NPNounPicker.tsx b/src/components/np-picker/NPNounPicker.tsx
index 10f6b2e..b849a8b 100644
--- a/src/components/np-picker/NPNounPicker.tsx
+++ b/src/components/np-picker/NPNounPicker.tsx
@@ -103,6 +103,7 @@ function NPNounPicker(props: ({
handleChange={setPatternFilter}
/>
} */}
+
Noun
{!(props.noun && props.noun.dynamicComplement) ?
{props.clearButton}
+ Participle
handlePronounTypeChange(g as "far" | "near")}
/>
-
+
diff --git a/src/components/np-picker/picker-tools.tsx b/src/components/np-picker/picker-tools.tsx
index 30ba8d2..47fec06 100644
--- a/src/components/np-picker/picker-tools.tsx
+++ b/src/components/np-picker/picker-tools.tsx
@@ -66,14 +66,26 @@ export function makeSelectOption(
e: T.DictionaryEntry | T.VerbEntry | T.NounEntry | T.AdjectiveEntry | T.LocativeAdverbEntry,
opts: T.TextOptions,
): { value: string, label: string } {
+ function truncateEnglish(s: string) {
+ const maxLength = 16;
+ return s.length <= maxLength
+ ? maxLength
+ : s.slice(0, maxLength) + "…";
+ }
const entry = "entry" in e ? e.entry : e;
- const eng = (isVerbEntry(e))
- ? (getEnglishParticiple(e.entry))
- : getEnglishWord(e);
+ const eng = (() => {
+ try {
+ return (isVerbEntry(e))
+ ? (getEnglishParticiple(e.entry))
+ : getEnglishWord(e);
+ } catch(err) {
+ return "";
+ }
+ })();
const english = typeof eng === "string"
? eng
: !eng
- ? ""
+ ? truncateEnglish(entry.e)
: ("singular" in eng && eng.singular !== undefined)
? eng.singular
: eng.plural;