From 2609be0d4335ed7885b0f6b2cf66b0d75256e46a Mon Sep 17 00:00:00 2001 From: Pagwin Date: Thu, 4 Sep 2025 15:44:40 -0400 Subject: [PATCH] event.result -> event.target.result --- static/demos/light-dark-demo-4/sw.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static/demos/light-dark-demo-4/sw.js b/static/demos/light-dark-demo-4/sw.js index 0cd19b0..86f2966 100644 --- a/static/demos/light-dark-demo-4/sw.js +++ b/static/demos/light-dark-demo-4/sw.js @@ -74,7 +74,7 @@ function toggleLightDark(transaction){ const grab = obj_store.get(1); grab.onerror = ()=>{console.error("grab error");res();}; grab.onsuccess = (event)=>{ - const val = event.result; + const val = event.target.result; console.log("Val is: ",val); if(val){ const yeet = obj_store.delete(1); @@ -105,7 +105,7 @@ async function handle_html(req, resp, body){ const obj_store = transaction.objectStore("light-dark-store", "readonly"); const grab = obj_store.get(1); - grab.onsuccess = (event) => {res(!!event.result)}; + grab.onsuccess = (event) => {res(!!event.target.result)}; }; });