Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
# Conflicts:
#	server/src/processing/LinesToParagraphModule/defaultConfig.json
#	server/src/processing/TableDetectionModule/README.md
  • Loading branch information
jvalls-axa committed Nov 21, 2019
2 parents 8b8f11e + 97777b9 commit 167bb9e
Show file tree
Hide file tree
Showing 60 changed files with 9,264 additions and 761 deletions.
356 changes: 40 additions & 316 deletions README.md

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions api/server/src/ServerManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,16 @@ export class ServerManager {
// merges custom parameter values with the value in the module specs
Object.keys(customConfig).forEach(key => {
specs[key].value = customConfig[key];

if (Array.isArray(specs[key].value)
&& typeof specs[key].value[0] === 'object'
&& specs[key].value[0].hasOwnProperty('pages')
&& specs[key].value[0].hasOwnProperty('flavor')) {
specs[key].value = specs[key].value.map((v: any) => ({
...v,
table_areas: v.table_areas || [],
}));
}
});

const mergedResult = [moduleName, specs].filter(m => !!m);
Expand Down
Loading

0 comments on commit 167bb9e

Please sign in to comment.