Skip to content

Commit 4e2e630

Browse files
committed
fix ts
1 parent 6ec7353 commit 4e2e630

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/components/tools/utils/SchemaFeatures.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ const featuresAll:Feature[] = [
9090
9191
9292
const features = computed(() => {
93-
const schemaKeys = Array.from(Object.keys(props.tool.schema ?? {})).filter(name => isNotEmpty(props.tool.schema[name]));
94-
const uischemaKeys = Array.from(Object.keys(props.tool.uischema ?? {})).filter(name => isNotEmpty(props.tool.uischema[name]));
93+
const schemaKeys = Array.from(Object.keys(props.tool.schema ?? {})).filter(name => isNotEmpty((props.tool?.schema as any)[name]));
94+
const uischemaKeys = Array.from(Object.keys(props.tool.uischema ?? {})).filter(name => isNotEmpty(props.tool?.uischema[name]));
9595
9696
const hasFeature = (keysExists: string[], keysFound: string[]) => keysExists?.find(x => keysFound.includes(x));
9797

src/lib/tools/SchemaTool.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ export class SchemaTool extends AbstractTool implements ToolInterface {
196196
}
197197

198198
const schemaTools = toolFinder.getTypedTools().control;
199-
const matchingTool = toolFinder.findMatchingTool(baseSchemaTool?.schema, schema, uischema, schemaTools);
199+
const matchingTool = toolFinder.findMatchingTool(baseSchemaTool?.schema ?? {}, schema, uischema, schemaTools);
200200
const clone = cloneEmptyTool(matchingTool, schema)
201201

202202
clone.edge.setParent(this);

0 commit comments

Comments
 (0)