diff --git a/package.json b/package.json index c6ef409..6514491 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "version": "0.0.64", + "version": "0.0.65", "author": "Regula Forensics, Inc.", "name": "@regulaforensics/document-reader-recipes", "description": "Document Reader Recipes", diff --git a/src/recipes/authenticity/get-authenticity-check-list/get-authenticity-check-list.recipe.ts b/src/recipes/authenticity/get-authenticity-check-list/get-authenticity-check-list.recipe.ts index 8635139..86a26c9 100644 --- a/src/recipes/authenticity/get-authenticity-check-list/get-authenticity-check-list.recipe.ts +++ b/src/recipes/authenticity/get-authenticity-check-list/get-authenticity-check-list.recipe.ts @@ -110,9 +110,9 @@ export const getAuthenticityCheckList = (input: ProcessResponse): RAuthenticityC } if (AuthenticityOCRSecurityTextCheckResult.isBelongs(item)) { - item.List.forEach((subItem) => { - let groupIndex = current.groups.findIndex((group) => group.group === subItem.Type) + let groupIndex = current.groups.findIndex((group) => group.group === item.Type) + item.List.forEach((subItem) => { if (groupIndex === -1) { current.groups.push(RAuthenticityCheckGroup.fromPlain({ group: subItem.Type, @@ -134,6 +134,14 @@ export const getAuthenticityCheckList = (input: ProcessResponse): RAuthenticityC } })) }) + + if (!item.List?.length) { + current.groups.push(RAuthenticityCheckGroup.fromPlain({ + group: item.Type, + checkResult: item.Result, + checks: [] + })) + } } if (AuthenticityPhotoIdentCheckResult.isBelongs(item)) {