From b8b5711fca8899e3b8840172d23287bc5d12dbcb Mon Sep 17 00:00:00 2001 From: Pagwin Date: Wed, 3 Sep 2025 17:07:07 -0400 Subject: [PATCH] there is some really dumb indexDB behavior causing this problem and I will complain about it in the blog post I swear --- static/demos/light-dark-demo-4/sw.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/static/demos/light-dark-demo-4/sw.js b/static/demos/light-dark-demo-4/sw.js index 4af865e..032c3f4 100644 --- a/static/demos/light-dark-demo-4/sw.js +++ b/static/demos/light-dark-demo-4/sw.js @@ -32,10 +32,8 @@ async function handle_redirect(req){ db_req.onsuccess = (event) => { const db = event.target.result; const transaction = db.transaction("light-dark-store", "readwrite"); - transaction.oncomplete = res; toggleLightDark(transaction) - .then(transaction.commit.bind(transaction)) .then(res); }; });