Skip to content

Commit e0cf738

Browse files
committed
globalThis instead of window
1 parent 53ab0e2 commit e0cf738

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib/serialize.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type {CellSpec, Cell, Notebook, NotebookTheme} from "./notebook.js";
22
import {toNotebook} from "./notebook.js";
33
import {isEmpty} from "./text.js";
44

5-
export function serialize(notebook: Notebook, {document = window.document} = {}): string {
5+
export function serialize(notebook: Notebook, {document = globalThis.document} = {}): string {
66
const _notebook = document.createElement("notebook");
77
_notebook.setAttribute("theme", notebook.theme);
88
if (notebook.readOnly) _notebook.setAttribute("readonly", "");

0 commit comments

Comments
 (0)