diff --git a/web/editor_ui.tsx b/web/editor_ui.tsx index 24bd1c2e..1e45a12b 100644 --- a/web/editor_ui.tsx +++ b/web/editor_ui.tsx @@ -106,7 +106,7 @@ export class MainUI { } else if (storedDarkModePreference === false) { theme = "light"; } else { - theme = window.matchMedia("(prefers-color-scheme: dark)").matches + theme = globalThis.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"; } diff --git a/web/space_lua/stdlib/os.ts b/web/space_lua/stdlib/os.ts index 7e5ff001..e17c7a02 100644 --- a/web/space_lua/stdlib/os.ts +++ b/web/space_lua/stdlib/os.ts @@ -1,4 +1,3 @@ -import { secureHeapUsed } from "node:crypto"; import { LuaBuiltinFunction, LuaTable } from "../runtime.ts"; const ONE_DAY = 1000 * 60 * 60 * 24;