We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents e336650 + 7c9a0f8 commit 93a3078Copy full SHA for 93a3078
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