fix cwookies type shit

This commit is contained in:
illusionTBA 2024-08-25 00:46:05 -04:00
parent 8666196db3
commit e057519e83

View file

@ -17,11 +17,13 @@ export default function (client: ScramjetClient, self: typeof window) {
set(ctx, value: string) { set(ctx, value: string) {
client.cookieStore.setCookies([value], client.url); client.cookieStore.setCookies([value], client.url);
client.serviceWorker.controller!.postMessage({ if (client.serviceWorker.controller) {
scramjet$type: "cookie", client.serviceWorker.controller!.postMessage({
cookie: value, scramjet$type: "cookie",
url: client.url.href, cookie: value,
}); url: client.url.href,
});
}
}, },
}); });