Skip to content

Commit

Permalink
Module Updater fix (#650)
Browse files Browse the repository at this point in the history
fix
  • Loading branch information
yofukashino authored Nov 4, 2024
1 parent 66f4216 commit 1df7737
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import { getSetting } from "./ipc/settings";

const electronPath = require.resolve("electron");
const discordPath = join(dirname(require.main!.filename), "..", "app.orig.asar");
// require.main!.filename = discordMain;
const discordPackage = require(join(discordPath, "package.json"));
require.main!.filename = join(discordPath, discordPackage.main);

Object.defineProperty(global, "appSettings", {
set: (v /* : typeof global.appSettings*/) => {
Expand Down Expand Up @@ -185,4 +186,4 @@ electron.app.once("ready", () => {
// This module is required this way at runtime.
require("./ipc");

require("module")._load(discordPath);
require(discordPath);

0 comments on commit 1df7737

Please sign in to comment.