Update Electron ~ fixes blue & light mode devtools

This commit is contained in:
Vendicated
2024-12-03 03:58:54 +01:00
parent 5d675efb64
commit 852410a43b
6 changed files with 944 additions and 552 deletions

View File

@@ -8,7 +8,9 @@ import { ipcMain, IpcMainEvent, IpcMainInvokeEvent, WebFrameMain } from "electro
import { DISCORD_HOSTNAMES } from "main/constants";
import { IpcEvents } from "shared/IpcEvents";
export function validateSender(frame: WebFrameMain) {
export function validateSender(frame: WebFrameMain | null) {
if (!frame) throw new Error("ipc: No sender frame");
const { hostname, protocol } = new URL(frame.url);
if (protocol === "file:") return;