From 9bab8f0bdbd5bf62849f60a0f2651ae622f69084 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Wed, 11 Jun 2025 17:25:52 +0300 Subject: [PATCH] refactor(canvas): remove unnecessary env setup --- apps/client/src/widgets/type_widgets/canvas.ts | 9 --------- 1 file changed, 9 deletions(-) diff --git a/apps/client/src/widgets/type_widgets/canvas.ts b/apps/client/src/widgets/type_widgets/canvas.ts index 8971ed6e2..a018c7dcf 100644 --- a/apps/client/src/widgets/type_widgets/canvas.ts +++ b/apps/client/src/widgets/type_widgets/canvas.ts @@ -163,15 +163,6 @@ export default class ExcalidrawTypeWidget extends TypeWidget { throw new Error("Unable to find element to render."); } - // See https://github.com/excalidraw/excalidraw/issues/7899. - if (!window.process) { - (window.process as any) = {}; - } - if (!window.process.env) { - window.process.env = {}; - } - (window.process.env as any).PREACT = false; - const Canvas = (await import("./canvas_el.js")).default; this.canvasInstance = new Canvas({ // this makes sure that 1) manual theme switch button is hidden 2) theme stays as it should after opening menu