better log

This commit is contained in:
Nuckyz 2024-05-24 03:13:41 -03:00
parent f727d101fc
commit f64b228cb9
No known key found for this signature in database
GPG key ID: 440BF8296E1C4AD9

View file

@ -162,7 +162,7 @@ Object.defineProperty(Function.prototype, "m", {
// This ensures we actually got the right one // This ensures we actually got the right one
const { stack } = new Error(); const { stack } = new Error();
if ((stack?.includes("discord.com") || stack?.includes("discordapp.com")) && !Array.isArray(moduleFactories)) { if ((stack?.includes("discord.com") || stack?.includes("discordapp.com")) && !Array.isArray(moduleFactories)) {
logger.info("Found Webpack module factory", stack.match(/\/assets\/(.+?\.js)/)?.[1] ?? ""); logger.info("Found Webpack module factories", stack.match(/\/assets\/(.+?\.js)/)?.[1] ?? "");
for (const id in moduleFactories) { for (const id in moduleFactories) {
// If we have eagerPatches enabled we have to patch the pre-populated factories // If we have eagerPatches enabled we have to patch the pre-populated factories