why does this not get added

This commit is contained in:
Toshit Chawda 2024-10-12 14:55:10 -07:00
parent 4ca362bc83
commit 597e663d09
No known key found for this signature in database
GPG key ID: 91480ED99E2B3D9D
2 changed files with 6 additions and 7 deletions

View file

@ -96,9 +96,9 @@ export class ScramjetController {
async #saveConfig() { async #saveConfig() {
if (!this.store) { if (!this.store) {
console.error("Store not ready!") console.error("Store not ready!");
return return;
} }
const tx = this.store.transaction("config", "readwrite"); const tx = this.store.transaction("config", "readwrite");
const store = tx.objectStore("config"); const store = tx.objectStore("config");

View file

@ -22,7 +22,7 @@ export class ScramjetServiceWorker extends EventTarget {
this.threadpool = new ScramjetThreadpool(); this.threadpool = new ScramjetThreadpool();
this.cookieStore.load this.cookieStore.load;
addEventListener("message", ({ data }: { data: MessageC2W }) => { addEventListener("message", ({ data }: { data: MessageC2W }) => {
if (!("scramjet$type" in data)) return; if (!("scramjet$type" in data)) return;
@ -62,7 +62,7 @@ export class ScramjetServiceWorker extends EventTarget {
const db = request.result; const db = request.result;
const tx = db.transaction("config", "readonly"); const tx = db.transaction("config", "readonly");
const store = tx.objectStore("config"); const store = tx.objectStore("config");
const config = store.get("config") const config = store.get("config");
config.onsuccess = () => { config.onsuccess = () => {
this.config = config.result; this.config = config.result;
@ -77,7 +77,6 @@ export class ScramjetServiceWorker extends EventTarget {
request.onerror = () => reject(request.error); request.onerror = () => reject(request.error);
}); });
} }
route({ request }: FetchEvent) { route({ request }: FetchEvent) {