Use view workspace instead of global app workspace

This commit is contained in:
Southpaw
2023-08-15 09:38:02 +01:00
parent 139f16b06d
commit 78bc6a66bc

View File

@@ -35,7 +35,7 @@ export const publishPost = async (
});
// get frontmatter
const noteFile = app.workspace.getActiveFile();
const noteFile = view.app.workspace.getActiveFile();
const metaMatter = app.metadataCache.getFileCache(noteFile).frontmatter;
const data = matter(view.getViewData());