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