Skip to content

Commit

Permalink
👔 Allow sidebar notes to link to themselves in the main space
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukas Petry committed Aug 31, 2023
1 parent 3b11ffa commit 71f73fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ export default class Opener extends Plugin {
}

// same file
if (file.path == app.workspace.getActiveFile()?.path) {
if (file.path == app.workspace.getActiveFile()?.path && openState?.eState?.subpath) {
// clicking on link with same path as active file in view (ie headings, blocks, etc). file.path is thing being opened. app.workspace.getActiveFile()?.path is currently opened tab filepath.
return defaultBehavior();
}
Expand Down

0 comments on commit 71f73fd

Please sign in to comment.