diff --git a/packages/designer/src/project/project.ts b/packages/designer/src/project/project.ts index 4d56d0441..3e17c1c9d 100644 --- a/packages/designer/src/project/project.ts +++ b/packages/designer/src/project/project.ts @@ -214,7 +214,7 @@ export class Project { return doc.open(); } if (typeof doc === 'string') { - const got = this.documents.find((item) => item.fileName === doc); + const got = this.documents.find((item) => item.fileName === doc || item.id === doc); if (got) { return got.open(); }