Skip to content
Snippets Groups Projects
Commit 2400f53ef515 authored by Frank Bessou's avatar Frank Bessou :spider_web:
Browse files

fix(create): increment variable name for each relationTarget

parent 7552931f3863
No related branches found
No related tags found
No related merge requests found
......@@ -201,9 +201,9 @@
}
});
const counter = 0;
let counter = 0;
function addRelation(
relationName: string,
resourceRole: "subject" | "object",
targetId: number
) {
......@@ -205,9 +205,9 @@
function addRelation(
relationName: string,
resourceRole: "subject" | "object",
targetId: number
) {
const relationTargetVariable = `Y${counter}`;
const relationTargetVariable = `Y${counter++}`;
if (resourceRole === "subject") {
assignments.push(`X ${relationName} ${relationTargetVariable}`);
} else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment