Skip to content

A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.

test: check document safely in CI (#5893)

Shahmir Varqha1a7ebb254da8
diff --git a/frontend/src/core/wasm/utils.ts b/frontend/src/core/wasm/utils.ts
index d6d4718318..d5def65b1e 100644
--- a/frontend/src/core/wasm/utils.ts
+++ b/frontend/src/core/wasm/utils.ts
@@ -5,5 +5,8 @@
*/
export function isWasm(): boolean {
// Document is sometimes undefined in CI so we check to reduce flakiness
- return document && document.querySelector("marimo-wasm") !== null;
+ return (
+ typeof document !== "undefined" &&
+ document.querySelector("marimo-wasm") !== null
+ );
}