Skip to content

Commit

Permalink
Bugfix: don't duplicate tag
Browse files Browse the repository at this point in the history
  • Loading branch information
adamchalmers committed Jan 14, 2025
1 parent 791595a commit dec761b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/lang/modifyAst.ts
Original file line number Diff line number Diff line change
Expand Up @@ -985,7 +985,9 @@ export function giveSketchFnCallTag(
const tagDeclarator =
existingTag || createTagDeclarator(tag || findUniqueName(ast, 'seg', 2))
const isTagExisting = !!existingTag
kwCallNode.node.arguments.push(createLabeledArg(ARG_TAG, tagDeclarator))
if (!isTagExisting) {
kwCallNode.node.arguments.push(createLabeledArg(ARG_TAG, tagDeclarator))
}
return { tagDeclarator, isTagExisting }
}

Expand Down

0 comments on commit dec761b

Please sign in to comment.