mirror of
https://github.com/d0zingcat/obsidian-send-to-ghost.git
synced 2026-05-13 23:16:49 +00:00
Use view workspace instead of global app workspace
This commit is contained in:
@@ -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());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user