Skip to content

Commit

Permalink
🐛 Fix export button dows not responding #102
Browse files Browse the repository at this point in the history
  • Loading branch information
mokeyish committed Sep 22, 2023
1 parent 9939b90 commit 28ab8c0
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions src/exporto0o.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,12 @@ export async function exportToOo(
attachmentFolderPath = path.join(currentDir, attachmentFolderPath.substring(1));
}

const frontMatter = await new Promise<unknown>(resolve => {
try {
fileManager.processFrontMatter(currentFile, frontMatter => {
resolve(frontMatter);
return frontMatter;
});
} catch (e) {
console.error(e);
resolve(undefined);
}
});
let frontMatter: unknown = null;
try {
await fileManager.processFrontMatter(currentFile, fm => frontMatter = fm);
} catch (e) {
console.error(e);
}

const variables: Variables = {
pluginDir,
Expand Down

0 comments on commit 28ab8c0

Please sign in to comment.