Skip to content

Commit

Permalink
Merge pull request #1028 from bridge-core/dev
Browse files Browse the repository at this point in the history
v2.7.6
  • Loading branch information
outercloudstudio authored Nov 26, 2023
2 parents 84538eb + 870533b commit d118627
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bridge",
"version": "2.7.5",
"version": "2.7.6",
"private": true,
"scripts": {
"dev": "vite",
Expand Down
8 changes: 7 additions & 1 deletion src/components/Editors/TreeEditor/TreeEditor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -419,9 +419,15 @@ export class TreeEditor {
const index = parentTree.children.length

for (const key in json) {
let newKey = key

if (parentTree instanceof ObjectTree) {
while (parentTree.get([newKey]) !== null) newKey += '_copy'
}

const newTree = createTree(parentTree, json[key])
if (parentTree instanceof ObjectTree)
parentTree.addChild(key, newTree)
parentTree.addChild(newKey, newTree)
else parentTree.addChild(newTree)

entries.push(
Expand Down

0 comments on commit d118627

Please sign in to comment.