@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/index.js
CHANGED
|
@@ -2189,7 +2189,8 @@ var WorkflowDocument = class extends import_document8.FlowDocument {
|
|
|
2189
2189
|
*/
|
|
2190
2190
|
_createWorkflowNode(json, options) {
|
|
2191
2191
|
const { parentID, onNodeCreated, onEdgeCreated } = options ?? {};
|
|
2192
|
-
const
|
|
2192
|
+
const existedNode = this.getNode(json.id);
|
|
2193
|
+
const isExistedNode = existedNode && existedNode.flowNodeType === json.type;
|
|
2193
2194
|
const parent = this.getNode(parentID ?? this.root.id) ?? this.root;
|
|
2194
2195
|
const node = this.addNode(
|
|
2195
2196
|
{
|