Some Fixes

Credit to sadan4
This commit is contained in:
thororen1234 2024-11-06 16:39:07 -05:00
parent 26c7feaa39
commit 05bef94b34
4 changed files with 9 additions and 17 deletions

View file

@ -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");

View file

@ -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",

View file

@ -275,16 +275,16 @@ export default definePlugin({
},
makeGuildsBarGuildListFilter(isBetterFolders: boolean) {
try {
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) {

View file

@ -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))
? <TypingUser {...props} user={users[element++]} />
: c
);