throw a rock at ben shapiro

This commit is contained in:
Nuckyz 2024-05-02 23:42:42 -03:00
parent 75fa0ff708
commit cd5e0aeec1
No known key found for this signature in database
GPG key ID: 440BF8296E1C4AD9

View file

@ -482,21 +482,32 @@ async function runtime(token: string) {
if (method === "webpackDependantLazy" || method === "webpackDependantLazyComponent") { if (method === "webpackDependantLazy" || method === "webpackDependantLazyComponent") {
const [factory] = args; const [factory] = args;
result = factory(); result = factory();
if (result != null && "$$vencordGetter" in result) result = result.$$vencordGetter();
if (result != null && "$$vencordGetter" in result) {
result = result.$$vencordGetter();
}
} else if (method === "extractAndLoadChunks") { } else if (method === "extractAndLoadChunks") {
const [code, matcher] = args; const [code, matcher] = args;
const module = Vencord.Webpack.findModuleFactory(...code); const module = Vencord.Webpack.findModuleFactory(...code);
if (module) result = module.toString().match(Vencord.Util.canonicalizeMatch(matcher)); if (module) {
result = module.toString().match(Vencord.Util.canonicalizeMatch(matcher));
}
} else { } else {
result = Vencord.Webpack[method](...args); result = Vencord.Webpack[method](...args);
// If the result is our Proxy or ComponentWrapper, this means the search failed // If the result is our Proxy or ComponentWrapper, this means the search failed
if (result != null && result[Vencord.Util.proxyInnerGet] != null) result = undefined; if (
if (result != null && "$$vencordGetter" in result) result = undefined; result != null &&
(result[Vencord.Util.proxyInnerGet] != null || "$$vencordGetter" in result)
) {
result = undefined;
}
} }
if (result == null) throw "find failed"; if (result == null) {
throw "a rock at ben shapiro";
}
} catch (e) { } catch (e) {
let logMessage = searchType; let logMessage = searchType;