We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ffc136f commit 7c9a0f8Copy full SHA for 7c9a0f8
1 file changed
src/graph-builder/graph-core/3-component.js
@@ -234,10 +234,10 @@ class GraphComponent extends GraphCanvas {
234
}
235
236
setEdgeNodeValidator({ nodeValidator, edgeValidator }) {
237
- // eslint-disable-next-line no-eval
238
- this.nodeValidator = eval(nodeValidator);
239
240
- this.edgeValidator = eval(edgeValidator);
+ // eslint-disable-next-line no-new-func
+ this.nodeValidator = new Function(`return ${nodeValidator}`)();
+ this.edgeValidator = new Function(`return ${edgeValidator}`)();
241
242
243
getNodesEdges() {
0 commit comments