Skip to content

Commit 7326b48

Browse files
Merge pull request #502 from gridaco/canary
chore: fix canvas logging
2 parents 29afd3b + 4bace4c commit 7326b48

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

editor/grida-canvas/editor.ts

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2827,11 +2827,9 @@ export class Editor
28272827
}
28282828

28292829
private log(...args: any[]) {
2830-
try {
2831-
if (this.debug || process.env.NODE_ENV === "development") {
2832-
this.logger?.(...args);
2833-
}
2834-
} catch {}
2830+
if (this.debug || process.env.NODE_ENV === "development") {
2831+
this.logger?.(...args);
2832+
}
28352833
}
28362834

28372835
private static __isRecord(v: unknown): v is Record<string, unknown> {
@@ -3109,7 +3107,13 @@ export class Editor
31093107
}
31103108

31113109
if (process.env.NEXT_PUBLIC_GRIDA_WASM_VERBOSE === "1") {
3112-
this.log("wasm::factory", factory.module);
3110+
// Don't log factory.module directly - it contains WebAssembly internals
3111+
// that can't be safely serialized (causes "Invalid array length" errors)
3112+
// need a better way to log this.
3113+
this.log("wasm::factory", {
3114+
type: typeof factory.module,
3115+
hasModule: !!factory.module,
3116+
});
31133117
}
31143118

31153119
const syncDocument = (

0 commit comments

Comments
 (0)