fix: uniqueid

This commit is contained in:
kangwei 2020-05-17 01:20:19 +08:00
parent 8cf0010441
commit 8db52f0f58

View File

@ -66,6 +66,7 @@ export class DocumentModel {
return this.modalNode || this.rootNode;
}
private inited = false;
constructor(readonly project: Project, schema?: RootSchema) {
/*
// TODO
@ -92,6 +93,7 @@ export class DocumentModel {
(schema) => this.import(schema as RootSchema, true),
);
this.setupListenActiveNodes();
this.inited = true;
}
@obx.val private willPurgeSpace: Node[] = [];
@ -161,6 +163,9 @@ export class DocumentModel {
}
let node: Node | null = null;
if (!this.inited) {
schema.id = null;
}
if (schema.id) {
node = this.getNode(schema.id);
if (node && node.componentName === schema.componentName) {