You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/backend/models/tree.ts
+39-27Lines changed: 39 additions & 27 deletions
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,7 @@ import { ComponentData } from '../types/backendTypes';
3
3
4
4
/** ComponentNames is used to store a mapping between a component's unique identifier and its name. This mapping is used to reconstruct the component instances during deserialization.*/
5
5
letcomponentNames={};
6
+
letrootTree;
6
7
7
8
// Making a deep clone of state becuase we want to make a copy
8
9
/**
@@ -20,6 +21,25 @@ export function serializeState(state) {
20
21
}
21
22
}
22
23
24
+
/**
25
+
* Tree.name's come from the name of the component, but these names should be unique. When a second component
26
+
* is used in a single tree, this function is called in checkForDuplicates to the change the Tree.name of the
0 commit comments