From 3f7c0cd5191b7924f2630c58e6439f4d4a936ac9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?LeoYuan=20=E8=A2=81=E5=8A=9B=E7=9A=93?= Date: Tue, 28 Jun 2022 10:58:39 +0800 Subject: [PATCH] feat: support opening document with id --- packages/designer/src/project/project.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(); }