From 65b64400247180cd07707fe69bb93864c7eba912 Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Tue, 7 May 2024 03:01:45 -0300 Subject: [PATCH] Clean up --- scripts/generateReport.ts | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/scripts/generateReport.ts b/scripts/generateReport.ts index 865c5cb38..0f5c2d8af 100644 --- a/scripts/generateReport.ts +++ b/scripts/generateReport.ts @@ -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") {