fix bug for capital case errors
This commit is contained in:
parent
49bcadf892
commit
c81a156fcd
1 changed files with 4 additions and 2 deletions
|
|
@ -13,7 +13,7 @@ import {
|
||||||
cleanEdgesType,
|
cleanEdgesType,
|
||||||
unselectAllNodesType,
|
unselectAllNodesType,
|
||||||
} from "../types/utils/reactflowUtils";
|
} from "../types/utils/reactflowUtils";
|
||||||
import { toNormalCase } from "./utils";
|
import { toTitleCase } from "./utils";
|
||||||
|
|
||||||
export function cleanEdges({
|
export function cleanEdges({
|
||||||
flow: { edges, nodes },
|
flow: { edges, nodes },
|
||||||
|
|
@ -216,7 +216,9 @@ export function validateNode(node: NodeType, edges: Edge[]): Array<string> {
|
||||||
) {
|
) {
|
||||||
errors.push(
|
errors.push(
|
||||||
`${type} is missing ${
|
`${type} is missing ${
|
||||||
template.display_name || toNormalCase(template[t].name)
|
template[t].display_name ||
|
||||||
|
toTitleCase(template[t].name) ||
|
||||||
|
toTitleCase(t)
|
||||||
}.`
|
}.`
|
||||||
);
|
);
|
||||||
} else if (
|
} else if (
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue