From 34b20213d084ead04c13119c08534d716af29012 Mon Sep 17 00:00:00 2001 From: An Orbit <68935009+orbit-loona@users.noreply.github.com> Date: Wed, 5 Feb 2025 20:34:15 -0500 Subject: [PATCH] the hell --- mods/a_mod_by_alice.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mods/a_mod_by_alice.js b/mods/a_mod_by_alice.js index e351e7ac..f5224482 100644 --- a/mods/a_mod_by_alice.js +++ b/mods/a_mod_by_alice.js @@ -3286,7 +3286,10 @@ color1 and color2 spread through striped paint like dye does with itself. col gameCanvas = document.getElementById("game"); canvas = document.getElementById("game"); - ctx = gameCanvas.getContext("2d"); + ctx = gameCanvas?.getContext?.("2d"); + if(!ctx) { window.addEventListener("load",function() { + ctx = gameCanvas.getContext("2d") + })} function setCanvasWidthAndHeight(ctx) { if (window.innerWidth < 700) {