Fix patching context menu (#1633)

This commit is contained in:
Strencher 2023-06-14 19:10:01 +02:00 committed by GitHub
parent 47da3f4d75
commit be4f788a03
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -56,7 +56,7 @@ class MenuPatcher {
if (!startupComplete) return Logger.warn("ContextMenu~Patcher", "Startup wasn't successfully, aborting initialization.");
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);
return {module: foundModule, key: foundKey};