fixed bug with the complement and perfect in phrase builder

This commit is contained in:
lingdocs 2022-07-11 12:52:01 -05:00
parent 9d44cde59e
commit 189ed32eca
2 changed files with 6 additions and 2 deletions

View File

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

@ -226,7 +226,11 @@ function getPsFromPiece(piece: T.Block | T.Kid, subjectPerson: T.Person): T.PsSt
} }
if (piece.block.type === "perfectParticipleBlock") { if (piece.block.type === "perfectParticipleBlock") {
// getLong is just for type safety - we will have split up the length options earlier in compileVPPs // getLong is just for type safety - we will have split up the length options earlier in compileVPPs
return getLong(piece.block.ps); const verbPs = getLong(piece.block.ps);
if (piece.block.complement) {
return combineComplementWVerbPs(piece.block.complement, verbPs);
}
return verbPs;
} }
if (piece.block.type === "perfectEquativeBlock") { if (piece.block.type === "perfectEquativeBlock") {
// just using the short one for now - it will only be short anyways // just using the short one for now - it will only be short anyways