Cybrkyd's Git Repositories

IndexedDB-notes - commit: d96a42e

commit d96a42ee50264e8d49473bec0d1c0f3140592ebbbef14735e8f165df6cd41230
author Cybrkyd <git@cybrkyd.com> 2026-06-05 17:40:23 +0100
committer Cybrkyd <git@cybrkyd.com> 2026-06-05 17:40:23 +0100

Commit Message

Fix: Subsequent saves on new active note now overwrites existing

📊 Diffstat

idb-notes.html 5
1 files changed, 4 insertions(+), 1 deletions(-)

Diff

diff --git a/idb-notes.html b/idb-notes.html
index b516e04..cc4536a 100644
--- a/idb-notes.html
+++ b/idb-notes.html
@@ -274,7 +274,10 @@ function saveDocument(text) {
content: text,
created: new Date().toLocaleString()
};
- store.add(doc);
+ const addReq = store.add(doc);
+ addReq.onsuccess = function(event) {
+ currentDocId = event.target.result;
+ };
}
tx.oncomplete = function() {