mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-23 17:29:54 +02:00
Throwing error for invalid shape
This commit is contained in:
@@ -244,8 +244,11 @@ export const insertNode = async (elem, node, dir) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add link when appropriate
|
if (!shapes[node.shape]) {
|
||||||
|
throw new Error(`No such shape: ${node.shape}. Please check your syntax.`);
|
||||||
|
}
|
||||||
if (node.link) {
|
if (node.link) {
|
||||||
|
// Add link when appropriate
|
||||||
let target;
|
let target;
|
||||||
if (getConfig().securityLevel === 'sandbox') {
|
if (getConfig().securityLevel === 'sandbox') {
|
||||||
target = '_top';
|
target = '_top';
|
||||||
|
Reference in New Issue
Block a user