shabegom / buttons

Buttons in Obsidian
The Unlicense
478 stars 50 forks source link

button "remove true" not working #220

Open cheezopath opened 3 months ago

cheezopath commented 3 months ago

Hello! I use the "remove true" feature of buttons in a daily note. Recently when I click it the button executes but does not get deleted. It's not a showstopper but I'd be grateful for a fix if it's not a headache. thanks!

Here's an example button that fails:

```button
name testbutton
type command
action Toggle pin
remove true

^button-j7om


Here's what the console has to say about it when I click:

plugin:buttons:1336 Uncaught (in promise) TypeError: Cannot destructure property 'lineStart' of 'undefined' as it is undefined. at remove (plugin:buttons:1336:42) at clickHandler (plugin:buttons:1629:15) remove @ plugin:buttons:1336 clickHandler @ plugin:buttons:1629 await in clickHandler (async)
eval @ plugin:buttons:1567 s @ enhance.js:1