Skip to content

Commit

Permalink
add additional check for #12
Browse files Browse the repository at this point in the history
  • Loading branch information
brianpetro committed Jan 11, 2023
1 parent d6858de commit 51ba661
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -316,13 +316,12 @@ class SmartConnectionsPlugin extends Obsidian.Plugin {
// DEPRECATED - currently included to prevent existing embeddings from being refreshed all at once
// check if file_key.mtime is greater than key.mtime
// check if both mtime values exist
if(this.embeddings[file_key].mtime && this.embeddings[key].mtime && (this.embeddings[file_key].mtime > this.embeddings[key].mtime)) {
if(this.embeddings[file_key] && this.embeddings[file_key].mtime && this.embeddings[key].mtime && (this.embeddings[file_key].mtime > this.embeddings[key].mtime)) {
// delete key
delete this.embeddings[key];
this.render_log.deleted_embeddings++;
// console.log("deleting (stale block - mtime): " + key);
}

}
}
}
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "Smart Connections",
"author": "Brian Petro",
"description": "Find links to similar notes using artificial intelligence from OpenAI.",
"version": "1.0.32",
"version": "1.0.33",
"minAppVersion": "1.1.0",
"authorUrl": "https://wfhbrian.com",
"isDesktopOnly": true
Expand Down

0 comments on commit 51ba661

Please sign in to comment.