Skip to content

Commit 95f08ed

Browse files
committed
array name add title
1 parent a6c101d commit 95f08ed

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "rc-editor-jsonschema",
3-
"version": "0.1.9",
3+
"version": "0.1.10",
44
"description": "jsonschema for landing in tech",
55
"keywords": [
66
"react",

src/components/ArrayType.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ export default class ArrayType extends React.Component<IMProps> {
6363
return null;
6464
}
6565
const children = data.map((item, i) => {
66-
let childName = typeof item.children === 'string' ? item.children : `${names[0]}`;
66+
let childName = item.title && typeof item.title.children === 'string' ? item.title.children : `${names[0]}`;
67+
childName = typeof item.children === 'string' ? item.children : childName;
6768
const length = childName.length;
6869
childName = childName.substring(0, 8);
6970
return (

0 commit comments

Comments
 (0)