VERB placeholder in phrase builder when a verb lacks ec info

This commit is contained in:
lingdocs 2022-06-29 18:52:36 -05:00
parent 102232f559
commit e68e143e95
2 changed files with 4 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "@lingdocs/pashto-inflector", "name": "@lingdocs/pashto-inflector",
"version": "3.1.6", "version": "3.1.7",
"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

@ -240,7 +240,9 @@ export function parseEc(ec: string): T.EnglishVerbConjugationEc {
const b = s.slice(0, -2); const b = s.slice(0, -2);
return [`${s}`, `${s}s`, `${b}ying`, `${s}d`, `${s}d`]; 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.slice(0, -1)
: s; : s;
return [`${s}`, `${s}s`, `${b}ing`, `${b}ed`, `${b}ed`]; return [`${s}`, `${s}s`, `${b}ing`, `${b}ed`, `${b}ed`];