Skip to content

Commit

Permalink
🔄 synced local 'skyvern-frontend/src/' with remote 'skyvern-frontend/…
Browse files Browse the repository at this point in the history
…src/'

<!-- ELLIPSIS_HIDDEN -->

| 🚀 | This description was created by [Ellipsis](https://www.ellipsis.dev) for commit e06710e5038a74a05efaa9f823e3e642d129558c  |
|--------|--------|

fix: correct ID generation for node adder in loop node in `FlowRenderer.tsx`

### Summary:
Fixes ID generation bug for node adder in `FlowRenderer.tsx` when first node is a 'loop'.

**Key points**:
- **Bug Fix**:
  - Fixes ID generation for node adder in `addNode()` in `FlowRenderer.tsx` when the first node is of type 'loop'.
  - Uses `nanoid()` for unique ID instead of concatenated string.

----
Generated with ❤️ by [ellipsis.dev](https://www.ellipsis.dev)

<!-- ELLIPSIS_HIDDEN -->
  • Loading branch information
ykeremy committed Sep 12, 2024
1 parent 9c4c3b7 commit 335c8c1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ function FlowRenderer({
if (nodeType === "loop") {
// when loop node is first created it needs an adder node so nodes can be added inside the loop
newNodes.push({
id: `${id}-nodeAdder`,
id: nanoid(),
type: "nodeAdder",
parentId: id,
position: { x: 0, y: 0 },
Expand Down

0 comments on commit 335c8c1

Please sign in to comment.