Skip to content

Commit 6d6cd14

Browse files
committed
fix typeinfo
1 parent a325dc2 commit 6d6cd14

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
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": "@node-projects/propertygrid.webcomponent",
3-
"version": "1.0.2",
3+
"version": "1.0.3",
44
"description": "a propertygrid webcomponent.",
55
"type": "module",
66
"main": "./dist/PropertyGrid.js",

src/PropertyGrid.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ export function typeInfoFromJsonSchema(jsonSchemaObj: any, obj: any, type: strin
7171
let usedType = type ?? obj.type;
7272
if (usedType) {
7373
const def = jsonSchemaObj.definitions[usedType];
74+
if (!def)
75+
return null;
7476
let tInfo: ITypeInfo = {};
7577
tInfo.name = usedType;
7678
tInfo.properties = [];
@@ -245,9 +247,9 @@ export class PropertyGrid extends BaseCustomWebComponentConstructorAppend {
245247
debugLevel: 0,
246248
scrollIntoViewOnExpandClick: false,
247249
iconMap: {
248-
expanderCollapsed: new URL("../../assets/images/expander.svg", import.meta.url).toString(),
249-
expanderExpanded: new URL("../../assets/images/expanderClose.svg", import.meta.url).toString(),
250-
},
250+
expanderCollapsed: new URL("../../assets/images/expander.svg", import.meta.url).toString(),
251+
expanderExpanded: new URL("../../assets/images/expanderClose.svg", import.meta.url).toString(),
252+
},
251253
quicksearch: true,
252254
checkbox: false,
253255
source: [],

0 commit comments

Comments
 (0)