ycnmhd / obsidian-lineage

Gingko-like interface in obsidian
MIT License
101 stars 7 forks source link

[BUG] Context menu on file would create a blank menu item #48

Closed Quorafind closed 1 month ago

Quorafind commented 3 months ago

Are you using the latest version of the plugin?

Have you checked for similar issues?

What happened?

  1. Right click on any file(not the folder) in the explorer view.
  2. See the blank context menu item between the Copy Obsidian URL and Rename

Clip_2024-06-19_09-14-57

What did you expect to happen?

Don't show the blank menu item or show correct menu item.

Relevant console output

Clip_2024-06-19_09-15-07

Obsidian version

1.6.3

OS

Windows

Quorafind commented 3 months ago

For quickly debugging, the issue occurs at this link: link.

Right click on file item in the file explorer also triggers the file-menu event, resulting in a null leaf. We can check if the leaf is not null before calling menu.addItem.

ycnmhd commented 1 month ago

Fixed in 0.6.1