From 6423d4478ded1ff2d3120d9707d1a584a0544d61 Mon Sep 17 00:00:00 2001 From: Pagwin Date: Fri, 3 Jan 2025 22:53:56 -0500 Subject: [PATCH] I didn't know how replace worked fuck --- static/demos/light-dark-superior_v1/sw.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/static/demos/light-dark-superior_v1/sw.js b/static/demos/light-dark-superior_v1/sw.js index 4afaca2..bda8a04 100644 --- a/static/demos/light-dark-superior_v1/sw.js +++ b/static/demos/light-dark-superior_v1/sw.js @@ -19,10 +19,10 @@ async function fetchResponse(event) { theme_toggled = value[0] === "t"; } // this is a somewhat brittle way of accomplishing our desired behavior - body.replace(``, + const new_body = body.replace(``, ``); - console.log(body); - return new Response(body, resp); + console.log(new_body); + return new Response(new_body, resp); } // needed if we actually want to get requests