Skip to content

Commit

Permalink
feat: support opening document with id
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoYuan authored and JackLian committed Jun 28, 2022
1 parent 152a24d commit 3f7c0cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/designer/src/project/project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit 3f7c0cd

Please sign in to comment.