obsidian-spreadsheets icon indicating copy to clipboard operation
obsidian-spreadsheets copied to clipboard

Context menu fix

Open ShadowFantasy opened this issue 1 year ago • 0 comments

The context menu would give the option to create a new spreadsheet when a file was selected. This would produce an error if the option was clicked because it would try to create a new spreadsheet using the file name which is not a directory.

I added an if statement that only gives the option when a directory is selected by checking if the "file" object in the event has a "children" property.

*Edit Now checks using "instanceof TFolder"

ShadowFantasy avatar Feb 21 '24 23:02 ShadowFantasy