diff --git a/main.ts b/main.ts index 139bed7..7975401 100644 --- a/main.ts +++ b/main.ts @@ -91,7 +91,10 @@ export default class SuperchargedLinks extends Plugin { for (let i = 0; i < propertyLeaves.length; i++) { const container = propertyLeaves[i].view.containerEl; let observer = new MutationObserver((records, _) =>{ - updatePropertiesPane(container, app.workspace.getActiveFile(), app, plugin); + const file = app.workspace.getActiveFile(); + if (!!file) { + updatePropertiesPane(container, app.workspace.getActiveFile(), app, plugin); + } }); observer.observe(container, {subtree: true, childList: true, attributes: false}); plugin.observers.push([observer, "file-properties" + i, ""]); diff --git a/manifest.json b/manifest.json index 1691539..8743d5a 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "supercharged-links-obsidian", "name": "Supercharged Links", - "version": "0.10.2", + "version": "0.10.3", "minAppVersion": "1.4.0", "description": "Add properties and menu options to links and style them!", "author": "mdelobelle & Emile",