Skip to content

Commit

Permalink
fix: properly clone elements
Browse files Browse the repository at this point in the history
fixes #51
  • Loading branch information
danielo515 committed Sep 29, 2023
1 parent 2c514b1 commit 667ebe0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/views/FormBuilder.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
const field = definition.fields[fieldIndex];
const newField = {
...field,
input: structuredClone(field.input),
name: findFreeName(fieldIndex),
};
definition.fields = [
Expand Down

0 comments on commit 667ebe0

Please sign in to comment.