Open
Description
When I import doc which has two array items (with a property that has null
) all works fine:
const importedDoc = cambria.importDoc({
items: [
{ name: 'Peter Johnson', nationality: null },
// { name: 'Ashley Appleseed', nationality: null },
{ name: 'John Doe', nationality: null }
]
})
but if I have 3 items in the array:
const importedDoc = cambria.importDoc({
items: [
{ name: 'Peter Johnson', nationality: null },
{ name: 'Ashley Appleseed', nationality: null },
{ name: 'John Doe', nationality: null }
]
})
it fails with error:
(node:21691) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'type' of null
at Object.mergeSchemaObjs (.../node_modules/to-json-schema/lib/helpers.js:40:19)
at .../node_modules/to-json-schema/lib/index.js:93:24
at Array.reduce (<anonymous>)
at ToJsonSchema.getCommonArrayItemSchema (...node_modules/to-json-schema/lib/index.js:92:22)
Node version: v12.18.3
Metadata
Metadata
Assignees
Labels
No labels