Only confirm for non-empty sticky notes

This commit is contained in:
Idrees Hassan committed 2025-10-26 20:47:36 -04:00
1 parent 1752189e4f
commit cda160414f
4 files changed
+7 -7

No files matched your search

+1 -1
View File
@@ -111,7 +111,7 @@ export function renderStickyNote(stickyNote, onSave, onDelete) {
if (closeButton) {
makeClosable(() => {
if (confirm("Are you sure you want to delete this sticky note?")) {
if (stickyNote.content.trim() === "" || confirm("Are you sure you want to delete this sticky note?")) {
onDelete();
noteElement.remove();
}