diff --git a/src/api/ContextMenu.ts b/src/api/ContextMenu.ts index fd8c7e100..114942ff6 100644 --- a/src/api/ContextMenu.ts +++ b/src/api/ContextMenu.ts @@ -103,7 +103,7 @@ export function findGroupChildrenByChildId(id: string | string[], children: Arra if ( (Array.isArray(id) && id.some(id => matchSubstring ? child.props?.id?.includes(id) : child.props?.id === id)) - || matchSubstring ? child.props?.id?.includes(id) : child.props?.id === id + || (matchSubstring ? child.props?.id?.includes(id) : child.props?.id === id) ) return children; let nextChildren = child.props?.children; diff --git a/src/plugins/betterFolders/index.tsx b/src/plugins/betterFolders/index.tsx index c2969988b..bb1a67ebb 100644 --- a/src/plugins/betterFolders/index.tsx +++ b/src/plugins/betterFolders/index.tsx @@ -200,8 +200,8 @@ export default definePlugin({ predicate: () => settings.store.sidebar, replacement: { // Render the Better Folders sidebar - match: /(?<=({className:\i\.guilds,themeOverride:\i})\))/, - replace: ",$self.FolderSideBar({...$1})" + match: /(container.{0,50}({className:\i\.guilds,themeOverride:\i})\))/, + replace: "$1,$self.FolderSideBar({...$2})" } }, {