diff --git a/main.js b/main.js index 709fdcc0..67420672 100644 --- a/main.js +++ b/main.js @@ -88,6 +88,11 @@ class SmartConnectionsPlugin extends Obsidian.Plugin { // runs when file is opened this.registerEvent(this.app.workspace.on('file-open', (file) => { + // if no file is open, return + if(!file) { + // console.log("no file open, returning"); + return; + } // return if file type is not markdown if(file.extension !== "md") { // if file is 'canvas' and length of current view content is greater than 300 then return diff --git a/manifest.json b/manifest.json index 58981cab..947ceee0 100644 --- a/manifest.json +++ b/manifest.json @@ -3,7 +3,7 @@ "name": "Smart Connections", "author": "Brian Petro", "description": "Find links to similar notes using artificial intelligence from OpenAI.", - "version": "1.0.16", + "version": "1.0.17", "minAppVersion": "1.1.0", "authorUrl": "https://wfhbrian.com", "isDesktopOnly": true