Ban circular dependencies (#3547)

This commit is contained in:
Sebastian Malton authored and GitHub committed 2022-01-05 11:35:44 -05:00
1 parent b227a86711
commit 4f75acf2b4
35 files changed
+209 -59

No files matched your search

+9 -1
View File
@@ -30,7 +30,15 @@ import { ClusterFrameInfo, clusterFrameMap } from "../cluster-frames";
import type { Disposer } from "../utils";
import type remote from "@electron/remote";
const electronRemote = ipcMain ? null : require("@electron/remote");
const electronRemote = (() => {
if (ipcRenderer) {
try {
return require("@electron/remote");
} catch {}
}
return null;
})();
const subFramesChannel = "ipc:get-sub-frames";