diff options
author | AutumnVN <autumnvnchino@gmail.com> | 2023-09-26 06:48:09 +0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-26 01:48:09 +0200 |
commit | f32d25b641dc89b623ec0930396827bfcf4921b2 (patch) | |
tree | aabb088f96e7b10a55ad5a99f221c8e92f0dc500 /src/plugins/permissionsViewer | |
parent | 4c7a2ba3406c2ba4ffc7237cdceaa8ebd2a491d3 (diff) | |
download | Vencord-f32d25b641dc89b623ec0930396827bfcf4921b2.tar.gz Vencord-f32d25b641dc89b623ec0930396827bfcf4921b2.tar.bz2 Vencord-f32d25b641dc89b623ec0930396827bfcf4921b2.zip |
viewRaw, viewIcons, permissionsViewer: fix some edge cases (#1745)
Co-authored-by: V <vendicated@riseup.net>
Diffstat (limited to 'src/plugins/permissionsViewer')
-rw-r--r-- | src/plugins/permissionsViewer/index.tsx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/permissionsViewer/index.tsx b/src/plugins/permissionsViewer/index.tsx index 7de29b3..8f31080 100644 --- a/src/plugins/permissionsViewer/index.tsx +++ b/src/plugins/permissionsViewer/index.tsx @@ -126,7 +126,7 @@ function MenuItem(guildId: string, id?: string, type?: MenuItemParentType) { function makeContextMenuPatch(childId: string | string[], type?: MenuItemParentType): NavContextMenuPatchCallback { return (children, props) => () => { - if (!props) return children; + if (!props || (type === MenuItemParentType.User && !props.user) || (type === MenuItemParentType.Guild && !props.guild)) return children; const group = findGroupChildrenByChildId(childId, children); |