This commit is contained in:
Nuckyz 2024-05-07 03:01:45 -03:00
parent 6e0064c5fc
commit 65b6440024
No known key found for this signature in database
GPG key ID: 440BF8296E1C4AD9

View file

@ -471,8 +471,6 @@ async function runtime(token: string) {
}
}
const WEBPACK_SEARCH_HISTORY_WITH_FILTER_NAME_PROP = ["find", "findComponent", "waitFor"];
// eslint-disable-next-line prefer-const
for (let [searchType, args] of Vencord.Webpack.webpackSearchHistory) {
args = [...args];
@ -518,7 +516,7 @@ async function runtime(token: string) {
let parsedArgs = args;
if (args[0].$$vencordProps != null) {
if (WEBPACK_SEARCH_HISTORY_WITH_FILTER_NAME_PROP.includes(searchType)) {
if (["find", "findComponent", "waitFor"].includes(searchType)) {
filterName = args[0].$$vencordProps.shift();
}
@ -528,11 +526,8 @@ async function runtime(token: string) {
// if parsedArgs is the same as args, it means vencordProps of the filter was not available (like in normal filter functions),
// so log the filter function instead
if (
parsedArgs === args && (searchType === "waitFor" ||
searchType === "find" ||
searchType === "findComponent" ||
searchType === "webpackDependantLazy" ||
searchType === "webpackDependantLazyComponent")
parsedArgs === args &&
["waitFor", "find", "findComponent", "webpackDependantLazy", "webpackDependantLazyComponent"].includes(searchType)
) {
logMessage += `(${parsedArgs[0].toString().slice(0, 147)}...)`;
} else if (searchType === "extractAndLoadChunks") {