mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-28 10:32:27 +08:00
refactor(canvas): remove unnecessary env setup
This commit is contained in:
parent
892c27c945
commit
9bab8f0bdb
@ -163,15 +163,6 @@ export default class ExcalidrawTypeWidget extends TypeWidget {
|
|||||||
throw new Error("Unable to find element to render.");
|
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;
|
const Canvas = (await import("./canvas_el.js")).default;
|
||||||
this.canvasInstance = new Canvas({
|
this.canvasInstance = new Canvas({
|
||||||
// this makes sure that 1) manual theme switch button is hidden 2) theme stays as it should after opening menu
|
// this makes sure that 1) manual theme switch button is hidden 2) theme stays as it should after opening menu
|
||||||
|
Loading…
x
Reference in New Issue
Block a user