Fix patching context menu (#1633)
This commit is contained in:
parent
47da3f4d75
commit
be4f788a03
|
@ -56,7 +56,7 @@ class MenuPatcher {
|
||||||
if (!startupComplete) return Logger.warn("ContextMenu~Patcher", "Startup wasn't successfully, aborting initialization.");
|
if (!startupComplete) return Logger.warn("ContextMenu~Patcher", "Startup wasn't successfully, aborting initialization.");
|
||||||
|
|
||||||
const {module, key} = (() => {
|
const {module, key} = (() => {
|
||||||
const foundModule = WebpackModules.getModule(m => Object.values(m).some(v => typeof v === "function" && v.toString().includes("CONTEXT_MENU_CLOSE")), {searchExports: false});
|
const foundModule = WebpackModules.getModule(m => Object.values(m).some(v => typeof v === "function" && v.toString().includes(`type:"CONTEXT_MENU_CLOSE"`)), {searchExports: false});
|
||||||
const foundKey = Object.keys(foundModule).find(k => foundModule[k].length === 3);
|
const foundKey = Object.keys(foundModule).find(k => foundModule[k].length === 3);
|
||||||
|
|
||||||
return {module: foundModule, key: foundKey};
|
return {module: foundModule, key: foundKey};
|
||||||
|
|
Loading…
Reference in New Issue