Skip to content

Commit

Permalink
chore(core): improve export snapshot tool (#6863)
Browse files Browse the repository at this point in the history
  • Loading branch information
EYHN committed May 13, 2024
1 parent f943067 commit 4ebe8f5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/frontend/core/src/pages/workspace/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@ export const Component = (): ReactElement => {
},
})
);
window.exportWorkspaceSnapshot = async () => {
window.exportWorkspaceSnapshot = async (docs?: string[]) => {
const zip = await ZipTransformer.exportDocs(
workspace.docCollection,
Array.from(workspace.docCollection.docs.values()).map(collection =>
collection.getDoc()
)
Array.from(workspace.docCollection.docs.values())
.filter(doc => (docs ? docs.includes(doc.id) : true))
.map(doc => doc.getDoc())
);
const url = URL.createObjectURL(zip);
// download url
Expand Down

0 comments on commit 4ebe8f5

Please sign in to comment.