Skip to content

Commit

Permalink
Adding case check
Browse files Browse the repository at this point in the history
  • Loading branch information
knsv committed Sep 13, 2024
1 parent 61af746 commit 4c26fe2
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,9 @@ export const insertNode = async (elem, node, renderOptions) => {
if (!shapes[node.shape]) {
throw new Error(`No such shape: ${node.shape}. Please check your syntax.`);
}
if (node.shape !== node.shape.toLowerCase()) {
throw new Error(`No such shape: ${node.shape}. Shape names should be lowercase.`);
}
if (node.link) {
// Add link when appropriate
let target;
Expand Down

0 comments on commit 4c26fe2

Please sign in to comment.