Fix for content updates

This commit is contained in:
Elio Struyf
2023-04-14 15:11:27 +02:00
parent 5939dccc3b
commit 28e4220b74
+3 -1
View File
@@ -50,7 +50,9 @@ export class StatusListener {
try {
commands.executeCommand('setContext', CONTEXT.isValidFile, true);
const article = await ArticleHelper.getFrontMatterByPath(document.uri.fsPath);
const article = editor
? ArticleHelper.getFrontMatter(editor)
: await ArticleHelper.getFrontMatterByPath(document.uri.fsPath);
// Update the StatusBar based on the article draft state
if (article && typeof article.data['draft'] !== 'undefined') {