mirror of
https://github.com/estruyf/vscode-front-matter.git
synced 2026-07-06 09:51:29 +02:00
Fix for content updates
This commit is contained in:
@@ -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') {
|
||||
|
||||
Reference in New Issue
Block a user