From 05bef94b343e580c7c996b2951881f09dd3a691f Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Wed, 6 Nov 2024 16:39:07 -0500 Subject: [PATCH] Some Fixes Credit to sadan4 --- src/components/VencordSettings/PatchHelperTab.tsx | 2 +- src/equicordplugins/themeLibrary/index.tsx | 8 -------- src/plugins/betterFolders/index.tsx | 14 +++++++------- src/plugins/typingTweaks/index.tsx | 2 +- 4 files changed, 9 insertions(+), 17 deletions(-) diff --git a/src/components/VencordSettings/PatchHelperTab.tsx b/src/components/VencordSettings/PatchHelperTab.tsx index 03626bf3..2fed19b6 100644 --- a/src/components/VencordSettings/PatchHelperTab.tsx +++ b/src/components/VencordSettings/PatchHelperTab.tsx @@ -244,7 +244,7 @@ function FullPatchInput({ setFind, setParsedFind, setMatch, setReplacement }: Fu } try { - const parsed = (0, eval)(`(${fullPatch})`) as Patch; + const parsed = (0, eval)(`([${fullPatch}][0])`) as Patch; if (!parsed.find) throw new Error("No 'find' field"); if (!parsed.replacement) throw new Error("No 'replacement' field"); diff --git a/src/equicordplugins/themeLibrary/index.tsx b/src/equicordplugins/themeLibrary/index.tsx index ae565eda..e137a60b 100644 --- a/src/equicordplugins/themeLibrary/index.tsx +++ b/src/equicordplugins/themeLibrary/index.tsx @@ -28,14 +28,6 @@ export default definePlugin({ } ).customSections; - const ThemeSection = () => ({ - section: "ThemeLibrary", - label: "Theme Library", - searchableTitles: ["Theme Library"], - element: require("./components/ThemeTab").default, - id: "ThemeSection", - }); - customSettingsSections.push(_ => ({ section: "ThemeLibrary", label: "Theme Library", diff --git a/src/plugins/betterFolders/index.tsx b/src/plugins/betterFolders/index.tsx index 50dee4f5..d3e7af73 100644 --- a/src/plugins/betterFolders/index.tsx +++ b/src/plugins/betterFolders/index.tsx @@ -275,16 +275,16 @@ export default definePlugin({ }, makeGuildsBarGuildListFilter(isBetterFolders: boolean) { - try { - return child => { - if (isBetterFolders) { + return child => { + if (isBetterFolders) { + try { return child?.props?.["aria-label"] === getIntlMessage("SERVERS"); + } catch (e) { + console.error(e); } - return true; - }; - } catch { + } return true; - } + }; }, makeGuildsBarTreeFilter(isBetterFolders: boolean) { diff --git a/src/plugins/typingTweaks/index.tsx b/src/plugins/typingTweaks/index.tsx index 4fb3c775..2b529373 100644 --- a/src/plugins/typingTweaks/index.tsx +++ b/src/plugins/typingTweaks/index.tsx @@ -134,7 +134,7 @@ export default definePlugin({ let element = 0; return children.map(c => - c.type === "strong" + c.type === "strong" || (typeof c !== "string" && !React.isValidElement(c)) ? : c );