@flowgram.ai/free-layout-core 1.0.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/index.js +2 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/package.json +9 -9
package/dist/esm/index.js
CHANGED
|
@@ -2138,7 +2138,8 @@ var WorkflowDocument = class extends FlowDocument {
|
|
|
2138
2138
|
*/
|
|
2139
2139
|
_createWorkflowNode(json, options) {
|
|
2140
2140
|
const { parentID, onNodeCreated, onEdgeCreated } = options ?? {};
|
|
2141
|
-
const
|
|
2141
|
+
const existedNode = this.getNode(json.id);
|
|
2142
|
+
const isExistedNode = existedNode && existedNode.flowNodeType === json.type;
|
|
2142
2143
|
const parent = this.getNode(parentID ?? this.root.id) ?? this.root;
|
|
2143
2144
|
const node = this.addNode(
|
|
2144
2145
|
{
|