shabegom / buttons

Buttons in Obsidian
The Unlicense
455 stars 47 forks source link

TypeError: Cannot read property 'file' of null #101

Closed cumany closed 5 months ago

cumany commented 2 years ago

When I open a note as Kanban , this error is reported if I click on the buttons which type is command. image image

NomarCub commented 2 years ago

I have the same error message when there's no file opened and I click on a button which is in a document in the sidebar. I think this is related to #66 and #67.

NomarCub commented 1 year ago

Some commands work now with the latest Obsidian version with active sidebar document support. But for example this open system explorer command button I placed in a sidebar note still doesn't work and leaves errors on console.

plugin:buttons:1421 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'id')
    at command (plugin:buttons:1421:45)
    at clickHandler (plugin:buttons:1570:9)
NomarCub commented 1 year ago

In 0.16.1, with sidebar focus disabled none of my commands work. With sidebar focus enabled most of them do.

shabegom commented 1 year ago

Oh 0.16.1 how will you cause me pain?

professoroakz commented 1 year ago

I am also getting this error, annoying. Can't seem to make any button work now.

plugin:buttons:1335 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'id') at command (plugin:buttons:1335:45) at clickHandler (plugin:buttons:1487:9)