obsidian-inline-scripts icon indicating copy to clipboard operation
obsidian-inline-scripts copied to clipboard

Warnings when there are no shortcuts configured in Settings

Open technicalpickles opened this issue 2 years ago • 0 comments

I've been working on some scripts, so I've been keeping an eye on the developer console. I've been noticing this output:

Inline Scripts Shortcut-file "settings" has no shortcuts. (Shortcut-files are sectioned with "__")

CleanShot 2023-11-25 at 12 11 28

I thought this might be related to my shortcut file, but clicking through the stack trace, I came to this line:

https://github.com/jon-heard/obsidian-inline-scripts/blob/acd25b6009232ac15f4df22582d127bf165e417b/src/ui_setting_shortcuts.ts#L49-L60

It turns out that this happens if I remove all the Shortcuts, ie:

CleanShot 2023-11-25 at 12 13 48

Adding the defaults back 'fixes' the warning. I'm not sure if there is a good way to skip over the shortcuts from the settings file if it's empty, but it would be nice to not have the extra noise while debugging.

technicalpickles avatar Nov 25 '23 17:11 technicalpickles