cardi icon indicating copy to clipboard operation
cardi copied to clipboard

Tag not deleted if multiple notes deleted at once

Open h-parker opened this issue 5 years ago • 1 comments

Hi! When I selected all the notes under a certain board and deleted them, the board itself was not deleted, despite having no more remaining notes (unlike when you just delete the last remaining note under a certain board). Thanks!

h-parker avatar Oct 18 '20 18:10 h-parker

Ah, yes I see, that'd be because of this line:

https://github.com/pickledish/cardi/blob/3904a15b11a63b27fa9cef053b233ba4bf792217/src/dynamodb/note.js#L252

It checks if there are one or fewer notes left on the board, but if you're deleting multiple notes at once, then it'll go straight from 3 (for example) to 0 without triggering that conditional. I can work on this

pickledish avatar Oct 24 '20 23:10 pickledish