diff --git a/package.json b/package.json index 81e027e..770ec9b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lingdocs/pashto-inflector", - "version": "0.9.6", + "version": "1.0.0", "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/InflectionsTable.tsx b/src/components/InflectionsTable.tsx index 264eee1..bb34829 100644 --- a/src/components/InflectionsTable.tsx +++ b/src/components/InflectionsTable.tsx @@ -11,11 +11,14 @@ import Pashto from "./Pashto"; import { Modal } from "react-bootstrap"; import TableCell from "./TableCell"; import * as T from "../types"; +import { isPluralInflections } from "../lib/p-text-helpers"; -const explanation = (inf: T.Inflections, textOptions: T.TextOptions) => { - // @ts-ignore - const w = inf["masc" in inf ? "masc" : "fem"][0][0]; - return <> +const explanation = (inf: T.Inflections | T.PluralInflections, textOptions: T.TextOptions) => { + const isPluralInfs = isPluralInflections(inf); + const w = "masc" in inf + ? inf.masc[0][0] + : inf.fem[0][0]; + return !isPluralInfs ? <>

In Pashto, nouns, pronouns, and adjectives get inflected when they are either: