From e68e143e95b02d2b0dd6e90abf84a932cfa280c2 Mon Sep 17 00:00:00 2001 From: lingdocs <71590811+lingdocs@users.noreply.github.com> Date: Wed, 29 Jun 2022 18:52:36 -0500 Subject: [PATCH] VERB placeholder in phrase builder when a verb lacks ec info --- package.json | 2 +- src/lib/misc-helpers.ts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 7ea2fbd..f8470b9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lingdocs/pashto-inflector", - "version": "3.1.6", + "version": "3.1.7", "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/misc-helpers.ts b/src/lib/misc-helpers.ts index 84f4f5d..0d62e6d 100644 --- a/src/lib/misc-helpers.ts +++ b/src/lib/misc-helpers.ts @@ -240,7 +240,9 @@ export function parseEc(ec: string): T.EnglishVerbConjugationEc { const b = s.slice(0, -2); return [`${s}`, `${s}s`, `${b}ying`, `${s}d`, `${s}d`]; } - const b = (s.slice(-1) === "e") + const b = s === "" + ? "VERB" + : (s.slice(-1) === "e") ? s.slice(0, -1) : s; return [`${s}`, `${s}s`, `${b}ing`, `${b}ed`, `${b}ed`];