Skip to content

Commit

Permalink
chore(core): export workspace snapshot devtool
Browse files Browse the repository at this point in the history
  • Loading branch information
EYHN committed May 10, 2024
1 parent 06890d6 commit cca0040
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(collection => collection.getDoc())
);
const url = URL.createObjectURL(zip);
// download url
Expand Down

0 comments on commit cca0040

Please sign in to comment.